2018年1月5日星期五

How To Make A Six-feet Micro:bit Insect

Introduction
This time we have made a six-feet robotic insect with micro:bit. We use three servos to adjust the center weight of the robot and make it slowly crawl like an insect.


Tools & Materials:
Acrylic Board
Glue Gun
Iron Wire
How To Make:
Step 1: Adhere the three servos onto the acrylic board.



Step 2: Connect the servos according to schematic diagram. (The servo in the center is connected to P0, the rest two are connected to P1 and P2 separately.)

Programming
Click to open Microsoft Makecode, write your code in the editor area.
Click Edit in the upper right corner to edit your program and then click Download below to download your code into micro:bit.

Code Explain
First of all, adjust your servo to the angle of 90 degrees and display an image on the micro:bit board.

The six-foot robot marches forward by adjusting its central weight. So we must rotate the center servo to the angle of 75 degrees and make the robot center turn right. Because the servo rotation takes some time, here we delay time for 200ms.

At this moment, the weight center turns right and its two feet both in front and back can touch the ground now. Next, try to make the two servo in the head and tail rotate to the angle of 100 degrees like human walk with a right foot stretched in the front.

Next step is to make the central servo rotate to the angle of 105 degree and the weight center stay in the left.

Now the weight center is in the left and the left two feet in the head and tail can touch the ground. Then rotate the two servos in the head and tail to the angle of 70 degrees like a human walk with left foot stretched in the front.

Circulate these movements, then the robot insect will come into life!

Success
Now you've made your own micro:bit robot insect successfully. Try to show it around your friends! I am sure they will like it very much.

This article is from: https://www.elecfreaks.com/12147.html
If you have any questions, you can contact: louise@elecfreaks.com.

没有评论:

发表评论

精选博文

How to Make a Counter with microbit

How to Make a Counter with microbit When we have boarded airplane, we often encounter a situation like this: a beautiful stewardess ca...