• Choose“screen up.” When the FiberBot is in this position, it will face
the ceiling, and the digital googly eye will be resting in the middle of
the micro:bit’s LED grid
(Figure
F
)
. (You can check if the positions
you program are correct by looking at how the real googly eye
moves around!).
6. Now, to make the eye move when you tilt the board:
• Right click on the outer “on screen up” block and duplicate the
entire mini-stack. It will also look like a ghost, because you already
have a block that says “screen up.” So change it to another choice:
“tilt left”
(Figure
G
).
• To move the eye to the left, click on the lights you need to turn on.
Then click on the already-lit LED squares you need to turn off. In this
case, you will turn on the column of lights next to the left side of the
eye, and turn off the lights on the right side.
• Stop and test your program on the micro:bit simulation. Notice that
if you mouse over or click on the left side of the simulated board,
the animation tilts to the left. Does the eye design move to the left?
F
136
Making Simple Robots, 2nd Edition
Make_Simple_Robots_interior_FIN.indd 136Make_Simple_Robots_interior_FIN.indd 136 4/26/22 1:56 PM4/26/22 1:56 PM