Code canvas
Tap a palette block to add it to your program. Edit the numbers, drag the × to remove. Hit Play to run it on the hub.
Palette
Program
▶
Tap blocks from the palette above.
Milo's screen
numbers & words will show here
What each block does
♪1
Play a sound.
⏩5
Turn the motor on. The number is the speed (1–10).
↻
Turn the motor this way.
✕
Stop the motor.
⧖1
Wait. The number is how many seconds.
👁<3
Wait until the motion sensor sees something close (reading less than the number).
⧖↑
Wait until the tilt sensor points up.
⧖↓
Wait until the tilt sensor points down.
●
Turn the hub light on. Tap it to pick a colour.
○
Turn the hub light off.
1231
Show a number on Milo's screen.
abcMilo
Show a word on Milo's screen.
↺
Loop forever. When Milo reaches this, go back to the start.