PROJECTS: Using Servos with MakeCode
Servos
and Micro:bit
It’s easy to connect servomotors
and program them in MakeCode!
Written by
Kathy Ceceri
KATHY CECERI is an award-winning
writer, educator, and maker with a
focus on science, technology, history,
and art. She develops teaching and
learning materials for Make:, Adafruit
Industries, and Girl Scouts of the USA.
ABOUT THE AUTHOR
Kathy Ceceri is an award-winning writer, educator, and maker, with a focus on
science, technology, history, and art. The author of over a dozen books for kids
featuring hands-on STEAM activities, Kathy teaches enrichment workshops at
schools, museums, libraries, and afterschool programs, both in person and
online. She also works with educators and parents looking for ways to make
learning more engaging and fun. In addition, Kathy develops teaching and
learning materials for companies like Maker Shed and Adafruit Industries, as
well as organizations including the Girl Scouts of the USA, where she helped
design a series of robotics badges and a nationwide cybersecurity competition.
Kathy lives along the Hudson River in Upstate New York.
88 makezine.com
In Make: Volume 79, Mario the Maker Magician
showed how to code an Arduino microcontroller
board to move a servomotor for a robot. It’s easy.
But here’s an even easier way, using the micro:bit
computer board and the popular MakeCode
visual programming language!
SERVO BASICS
A servomotor is different from regular motors
because you can control how far and how fast
it turns using computer programming. Mini
servomotors are great for using with simple
robots, because they can be controlled directly by
small boards like the BBC micro:bit. They’re not
very powerful, but they’re perfect for lightweight
designs made with paper and cardboard.
(Bigger servos and regular motors need add-on
hardware to work with microcontrollers.)
Just like regular motors, servos have a shaft
— the part of the motor that sticks out and spins.
To help you attach things to it, the servos you will
use come with interchangeable hornslittle
plastic arms that snap onto the motor shaft. You
usually get a variety of shapes with each servo.
They all have tiny holes you can tie or hook things
to, and come with a screw if you want to connect
something to the servo more permanently.
There are two kinds of servos you may run into
when building simple robots. For the projects
in my book (which this article is excerpted
from, see page 91), you will be using positional
servomotors. These motors can only turn halfway
around, then pivot back. In robotics, they’re used
for heads, arms, legs, and other parts that need
to swing back and forth. For spinning wheels or
cranks, small robots use continuous servomotors,
M81_088-91_SimpRobots2_F2.indd 88M81_088-91_SimpRobots2_F2.indd 88 4/12/22 4:23 PM4/12/22 4:23 PM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.205.163