
6. To finish this stack of blocks, drag a “set servo [P0] angle to [0]” block
under the variable block inside the “forever” block. Replace the zero
with an oval-shaped variable block that says “angle”
(Figure
L
).
You’re
ready to test it out!
To see sample code using MakeCode tilt commands, go to Easy
Tilt DrawBot: makecode.microbit.org/_TwE7ts3cD65A.
To see sample MakeCode that uses a range of accelerometer
readings to decide how far to move a pen, go to Advanced Tilt
Control DrawBot: makecode.microbit.org/_g7q64A10aUD3.
TROUBLESHOOTING TIPS
Here are some suggestions if the robot’s body gives you problems:
• If the marker doesn’t stay put in the ...