- micro:bit board
- Makey:bit board
- USB data cable
- 2 servos (positional)
- 2 brads
- cereal-type box or sturdy piece of cardboard
- thin washable marker
- copy or drawing paper
- scissors (preferably pointy) or other cutting tool to make holes in cardboard
- sharp pencil
What Will You Make?
In this project, you will create a programmable drawing robot, also called a plotter. The Makey:bit and the micro:bit control two servos, which make the arms move around. The micro:bit’s accelerometer lets you use the Makey:bit as a tilt controller and tell the plotter to draw back and forth and side to side across the paper!
What Will You Learn?
You’ll learn to use the input from an accelerometer to control servos with MakeCode and a micro:bit.
Prep the Base
The base of the plotter is a folded-over ridge of cardboard that holds the servos, and a flat surface that holds the drawing paper. Cereal box cardboard has a coating on the outside that prevents the marker from soaking through. To make it out of a sheet of cardboard, fold the end of a rectangle over twice and tape it as shown.
To make the plotter base out of a cereal box, lay the box down on its back. Draw a line across the box about 2 inches up from the bottom. Press hard. Draw another line about 2 inches above the first.
Cut one top edge of the box from the opening at the top to the first line. Repeat with the other edge. This will turn the front of the box into a flap you can fold back.
Fold the flap up along the second line. Then fold it down along the first line. Press the rest of the flap into the bottom of the box so it lays flat. If you want, trim the other end of the box to fit around the flap. Tape everything in place.
Insert the Servos
Place the servos on the stand, trace around them, and cut out the shapes.
Cut a hole in the back of the box. Insert the servos into the hole on top. Pull the servo cables out through the hole in the back.
To calibrate the servos so they face front when set at neutral (90 degrees), follow these steps with each one:
- Attach a servo horn with an arm facing straight ahead.
- Gently turn the servo horn all the way to the right, as far as it will go. If the arm is not pointing to the right (3 o’clock position), then remove the servo horn and snap it back on in the correct position.
- Turn the servo so the arm points straight ahead again.
Make the Arms
Cut four strips of sturdy cardboard, about 1 inch wide by 4 or 5 inches long.
Connect the ends of two strips with a brad. Use the sharp pencil to make a starter hole if needed. You now have an arm that bends at the “elbow.” Repeat with the other two strips.
Take the end of one arm and overlap it with the end of the other arm. To make a holder for the marker, poke the sharp pencil through both layers of cardboard.
Insert the marker through both layers of cardboard. With the cap end of the marker facing down, play around with the ends of the arms. See how you can move them to make the pen go in different directions.
Tape the loose ends of the arms securely to the servo horn.
Test it with some paper cut down to fit inside the box. See where the marker goes to the right, left, front and back of the box.
Connect the Makey:bit to the Servos
Insert the micro:bit into the Makey:bit.
Plug the cable wires for one servo over the pins marked SRVA. Write P0 next to the servo.
Plug the cable wires for the other servo over the pins marked SRVB. Write P2 next to the servo.
Use the data cable to connect the micro:bit to your computer and get ready to code!
Sample Plotter Code https://makecode.microbit.org/_XMd1evDoHfMm
Code the arms to move in the direction you tilt the Makey:bit.
NOTE: Only move the servo(s) a little way to the right or left. This will help you avoid jerking the plotter arms around too far and damaging the cardboard or the electronics. If needed, increase the movement in small steps until you reach the amount you want.
- On start, set the servos to 90 degrees (neutral position).
- From Input, grab the “on shake” block.
- Open the drop-down menu and choose “tilt left.”
- Add a stack of blocks to make the servos turn left.
- Download and test your code.
- When it’s correct, duplicate the stack and change everything to turn to the right.
- Add comments to remember what your code does!
About the Makey:bit
The Makey:bit Adventure Board is the perfect way to get started with microcontrollers. With this exclusive Maker Shed kit, you’ll be able to easily launch into the world of electronics and create amazing projects.
This all-in-one board includes everything you need to get started, including a built-in LED, buzzer, and various sensors. Plus, the Makey:bit is compatible with all kinds of additional modules, so you can easily expand your creativity.
So what are you waiting for? Get the Makey:bit Adventure Board today and start supercharging your microcontrollers!
Are you looking for a way to supercharge your microcontrollers? If so, then you need the Makey:bit Adventure Board! This exclusive Maker Shed product is packed with features that will take your microcontrollers to the next level. With the Makey:bit, you’ll be able to launch into the realm of microcontrollers and unleash their full potential. The Makey:bit is loaded with features that make it an essential tool for anyone looking to get the most out of their microcontrollers.
Previous ProjectNext Project