Magic Lamp
Let’s make a magic lamp that spins and shines.
Build your own magic lamp.

Blocks needed
- × 1

- × 1

- × 1

- × 15

- × 16

- × 2

How to build 16 steps
1 / 16
Coding mission
Code the magic lamp to spin and shine in colors when it gets dark.
Blocks and their jobs
DC Motor Block 1Spinning magic wand
Light Sensor BlockSensor that detects light
Master BlockLamp light
Let's think
Think about machines that work with a light sensor, and talk about what they do.


Show the solution
When it is bright, the lamp does nothing. When it gets dark, it spins while shining red, yellow, blue and purple lights. The commands inside the condition block keep repeating as long as the condition is detected – check that they really repeat!
Mission complete!
Built it and coded it? Tap to save your progress.
















