SERVOS FOR THE MICRO:BIT
A servo motor is a motor that allow you to closely control the rotation of the shaft in terms of degrees of rotation. That means it doesn't just turn continuously, you can have it turn a set number of degrees. They are very useful in robots, where you need to have an arm or leg rotate through set angle, say 20 degrees, 45 degrees, 90 or 180. Servos often come with multiple attachments, such as wheels or levers, known as “horns”, that can be attached to the shaft, to fit the device they are operating.
SparkFun provides a good Servo tutorial here: https://learn.sparkfun.com/tutorials/hobby-servo-tutorial The GIF above is from the tutorial and demonstrated two servos controlled by a joystick. One servo rotates the assembly in a horizontal plane, the other rotates vertically.
There are lots of tutorials and videos about using servos and micro:bits. The first video listed is a good introduction, but with lots of "how motors work" information. If you want to just find out how to use MakeBlock code to add servos to your Micro:bit, jump to the 4 and half minute mark and you'll see how to add Servo extensions and then use the code to control the servos.
A video and a reference page from the Micro:bit support site discuss connecting the servo to your bit and coding so that you can use the servos in your program.
https://support.microbit.org/support/solutions/articles/19000101864-using-a-servo-with-the-micro-bit
And the reference page is here: https://makecode.microbit.org/reference/pins/servo-write-pin
Servos and the Micro:bot
Your Micro:bot kit includes two servo motors with hookup cables. The SparkFun Micro:bot guide walks you through an example of mounting, connecting, and coding the servos, in this case helping you build a battle bot: https://learn.sparkfun.com/tutorials/microbot-kit-experiment-guide/experiment-5-controlling-a-servo---battle-bot
The servos are attached to the front of the bot with ping pong ball-tipped skewers serving as lances.


Comments
Post a Comment