Inchworm
Inchworm
Make a funny inchworm robot!
Duration
3 Activities, approx 30-45 min each based on familiarity with the coding concepts.
Materials
- Cardboard pieces (recycle!)
- Glue gun or Tape (masking, duct tape, and/or packing tape)
- Scissors that can cut cardboard
- 1 micro:bit, battery holder and 2 AAA batteries
- 3 Crocodile clips
- 1 micro servo 9g SG90
- 1 paper clip
Activities
Make
Turn a piece of cardboard into an inchworm! Duration: ~45 minutes
Materials
- Cardboard
- Scissors or cutters
- glue gun or tape
- 1 paper clip
Step 1: Cardboard
Cutout a cardboard rectangle. You can use the micro:bit as a ruler to figure out the size.
Step 2: Fold the middle
Make a fold in the cardboard right in the middle of the long side.
Step 3: Body arch
Make two smaller folds at the ends which lay flat on the ground. This is the base of the inchworm’s body.
Step 4: Front teeth
Fold in each of corner on one end of the cardboard. This is the front of the inchworm which will grip the ground.
Step 5: Back legs
Using scissors or a cutter (watch the fingers!), cut slits in the other end to make finger-like (these will be the actually) shapes. Fold one up, one down, and so on.
Step 6: Mounting the board
Using tape or a glue gun, mount the micro:bit on one side.
Step 7: Mounting the servo
Attach the servo (with tape or glue) on the edge of the other side of the cardboard.
Step 8: Cable clean up (optional)
Use tape to route the cables nicely on the inchworm.
Step 9: Attaching paper clip to servo
Unfold a paper clip and attach it to the servo arm.
Step 10: Attaching paper clip to cardboard
Slide the folded part of the paper clip into the cardboard and use tape to secure it. You might need to toy around with the size of the clip so that the servo rotation opens the inchworm sufficiently.
Step 11: It’s ready!
Your inchworm is ready!
Code
Add code to make the inchworm move. Duration: ~30 minutes
Step 1: walk forever
In order for the inchworm to move, the micro:bit needs to command the servo to move between 0
and 180
degrees at a certain pace. The code below starts the inchworm moving when the A
button is pressed.
You might notice that the inchworm goes really slow or maybe just won’t move at all. Try to improve the design of your legs and teeth until the inchworm can go as fast as possible. Also, trying it on the carpet gives it more grip and helps to avoid skidding.
Connect
Remote control your inchworm with another micro:bit. Duration: ~30 minutes You will need one more micro:bit for this part. By using the radio, we can control the inchworm with another micro:bit. Download the code below to the micro:bit on the inchworm and then again onto a “controller” micro:bit. Whenever button A is pressed, the inchworm moves once.