Course overview
Shade a micro:bit with your hand. Can your code tell when it gets darker? The BBC micro:bit is a pocket-sized computer with sensors, buttons and a grid of lights. Students snap code blocks together in Microsoft MakeCode, then run their code on the board.
Planning your workshop
School levels: Upper primary, secondary and junior college
Past formats: A 2-hour taster or a 6–14-hour lesson series
The project can use just the board’s built-in sensors and lights, or add components like a buzzer. Tell us whether you’re planning a taster or a series, which kits your school has and what students have already made.
Learning outcomes
- Explain how a physical input can trigger a device to respond.
- Write code that makes a device respond differently when conditions change.
- Test a prototype in different situations and explain what they’d change.
Curriculum and hands-on
Students use MakeCode blocks to connect inputs, such as buttons and sensors, to outputs like light or sound. For a light alarm, they might compare readings by a window and under a desk, set a threshold and check when the display lights up.
For a longer example, see how we taught electronics and coding in our 2025 primary school programme.

