ROBOTICS AND CODING MODULE

micro:bit · Robotics & Coding

Turning embedded inputs and outputs such as buttons, LEDs, accelerometers, radio and sound into a real task using blocks or Python.

Last updated: 27 July 2026
MODULE IDENTITY

The distinctive work of this module

Turning embedded inputs and outputs such as buttons, LEDs, accelerometers, radio and sound into a real task using blocks or Python.

Completion evidence: MakeCode/Python programme, simulator test, device test and data record.

Test a small accelerometer- or button-driven programme first in simulation and then on the device; record differences in a table.

Core production

MakeCode/Python programme, simulator test, device test and data record

Laboratory

Test a small accelerometer- or button-driven programme first in simulation and then on the device; record differences in a table.

Safety / limit

Record power, wiring, data or user limits on hardware, and model limitations in simulation.

LESSON SEQUENCE

A 13-step learning pathway

The order is recommended. Before a project page, complete evidence from foundation, practice and debugging lessons.

01 · Variables and Loops

Build counters and repeating behaviour with variables and loops on the micro:bit.

Open lesson →

02 · Buttons and Events

Learn to write event-driven programs with the A and B buttons. An in-depth guide to Buttons and Events with practical examples, safety notes and explained review activities.

Open lesson →

03 · The Accelerometer

Learn to detect shakes, tilt and movement with the accelerometer and respond.

Open lesson →

04 · The LED Matrix

Learn to show icons, numbers and scrolling text on the 5×5 LED matrix.

Open lesson →

05 · The MakeCode Editor

Learn the MakeCode block editor, the simulator and how to upload code to the micro:bit.

Open lesson →

06 · Meet the micro:bit

Get to know the micro:bit's parts, what it does and how it is powered.

Open lesson →

07 · Pins and External Components

Learn to connect external LEDs, buzzers and buttons to the edge pins safely.

Open lesson →

08 · Project: Step Counter

Build a step counter that uses the accelerometer with a threshold and filtering.

Open lesson →

09 · Project: Bike Safety Light Prototype

Build a bike safety-light prototype that blinks in the dark using the light sensor and LEDs.

Open lesson →

10 · Project: Wireless Scoreboard

Build a wireless scoreboard that works with two micro:bits and radio. An in-depth guide to Project: Wireless Scoreboard with practical examples, safety notes and explained review activities.

Open lesson →

11 · Python on the micro:bit

Move from blocks to MicroPython and write the same programs in Python.

Open lesson →

12 · Radio Communication

Learn to send messages and numbers between two micro:bits over radio. An in-depth guide to Radio Communication with practical examples, safety notes and explained review activities.

Open lesson →

13 · Measuring Temperature and Light

Learn to read the micro:bit's temperature and light sensing and decide using a threshold.

Open lesson →
EVIDENCE MATRIX

Four checks before saying it works

Four checks before saying it works table
CheckQuestionEvidence to keep
InputWhich value, event or user request enters the system?Sample inputs and edge cases
ProcessWhich rule, algorithm or physical relationship is applied?Code, calculation, diagram or state table
OutputWhat should be observed in correct and incorrect states?Expected–actual comparison
SafetyUnder which condition should the system stop or request help?Safe-stop and recovery behaviour
MODULE-SPECIFIC DEPTH

micro:bit · Robotics & Coding: from one example to a system

Turning embedded inputs and outputs such as buttons, LEDs, accelerometers, radio and sound into a real task using blocks or Python. A correct example alone is therefore insufficient. Completion evidence should be makecode/python programme, simulator test, device test and data record, tested with normal, boundary and invalid inputs.

In the first cycle, pair foundation and application among Variables and Loops, Buttons and Events, The Accelerometer, The LED Matrix, The MakeCode Editor. Predict the result, run or measure it, then explain any difference. Even when prediction and reality match, state which changed condition would break the result.

In the second cycle, complete this laboratory: Test a small accelerometer- or button-driven programme first in simulation and then on the device; record differences in a table. Do not close with one successful screenshot. Keep the input table, expected behaviour, actual behaviour, error or measurement and the correction in one file.

In the final cycle, connect Project: Bike Safety Light Prototype, Project: Wireless Scoreboard, Python on the micro:bit, Radio Communication, Measuring Temperature and Light. Let one lesson's output become another lesson's input; show where safe stopping is needed when data type, unit, wiring, timing or user expectation changes.

Repeat the same task one month later with less source support. Compare not only speed or appearance but test coverage, explainability, safety and whether another person can rebuild the work.

CROSS-LESSON BRIDGE

How do Variables and Loops and Measuring Temperature and Light connect?

Use the foundation produced in Variables and Loops as an input to Pins and External Components. Then show in Measuring Temperature and Light how the same idea changes under the limits of a larger system. This bridge carries the goal of turning embedded inputs and outputs such as buttons, leds, accelerometers, radio and sound into a real task using blocks or python. beyond one isolated example.

Add three columns to the makecode/python programme, simulator test, device test and data record file: knowledge carried from the previous lesson, condition changed in the new lesson and result observed in testing. Sharing a word does not establish a connection; one lesson’s output should genuinely become the next process’s input.

Test the connection through this laboratory: Test a small accelerometer- or button-driven programme first in simulation and then on the device; record differences in a table. After the first attempt, add an edge condition such as empty data, wrong type, disconnected input, extreme value or user error. Record whether the system remains understandable and safe beyond the normal example.

  • Name the previous lesson output
  • State the one changed condition
  • Separate expected and actual result
  • Define safe stopping or error feedback
  • Make one change in the second version
MICRO QUIZ

Test the reasoning behind the module

1. What is the module completion evidence?

MakeCode/Python programme, simulator test, device test and data record

2. Does a simulator replace hardware testing?

No. A simulator tests logic; physical power, wiring and sensor conditions require separate tests.

3. Which four fields belong in an error log?

Condition, expected result, actual result and change made.

4. When should the project page be opened?

After completing foundation concepts and at least one practice artefact.

5. What is the module mini laboratory?

Test a small accelerometer- or button-driven programme first in simulation and then on the device; record differences in a table.

PRIMARY SOURCES

Verify versions and tool behaviour

micro:bit lessons

Primary source for current technical behaviour and limits.

Open source →

micro:bit features

Primary source for current technical behaviour and limits.

Open source →