Robotics with Micro:bit
Course At a Glance
Category
Robotics
Level
Beginner
Age Group
11–13 years
Prerequisite
Basic Computer Skills
Duration
36 Hours
Modules
4 Modules
Program Outcomes
By the end of this course, students will be able to:
- 1
Understand fundamental robotics concepts including sensors, inputs, and outputs.
- 2
Program Micro:bit to interact with hardware components and respond to environmental changes.
- 3
Build and demonstrate a simple robotics project using basic electronic components.
Introduction to Robotics & Micro:bit
Students are introduced to robotics concepts and the Micro:bit board. They learn about inputs, outputs, sensors, the LED matrix, and basic programming logic using MakeCode block-based coding.
| # | Lesson Title | What Students Learn | Activity / Project | Key Blocks / Components |
|---|---|---|---|---|
| 1.1 | What is Robotics? | Introduce robotics: sensors (input), processor (thinking), and actuators (output). Explore real-world robots. | Discussion & Exploration: Watch clips of real-world robots. Sketch and label a simple robot of their own imagining. | Sensors, actuators, input, output, processor |
| 1.2 | Meet the Micro:bit | Explore the physical Micro:bit board: LED matrix, buttons, edge pins, USB, sensors, and radio. | Hardware Exploration: Identify all components on the board. Connect via USB and download a sample program. | LED matrix, Button A/B, pins, accelerometer, USB, MakeCode editor |
| 1.3 | MakeCode: Block-Based Programming | Navigate the MakeCode workspace. Understand event blocks (on start, forever). Flash a program via USB. | First Program: Scroll 'Hello, World!' and display a heart icon on the LED matrix. Flash to the board. | on start, forever, show string, show icon, Basic category |
| 1.4 | LED Matrix: Text, Icons & Animations | Control the 25-LED matrix. Display custom text, built-in icons, numbers, and hand-drawn LED patterns using loops. | Build: 'LED Emoji Animator' — sequence 5 custom LED faces using show leds with pause in a forever loop. | show leds, show number, pause, clear screen, forever loop |
| 1.5 | Buttons as Inputs | Use Button A, B, and A+B as digital inputs. Distinguish event-driven presses from continuous polling. | Build: 'Reaction Tester' — a countdown is shown; react to GO! with button presses that display fast/slow feedback. | on button A pressed, on button B pressed, on button A+B pressed, button A is pressed |
| 1.6 | Variables & Logic in MakeCode | Use variables to store numbers. Apply if-then-else logic and comparison operators to make decisions. | Build: 'Score Keeper' — press A to increment, B to decrement. Show a trophy icon and sound when score reaches 10. | set variable, change variable by, if-then-else, >, =, show number |
| 1.7 | Loops & Repetition | Use repeat and for index blocks. Understand loop counting variables vs infinite loops. | Build: 'Countdown Timer' — uses a for loop counting 10 to 0, showing numbers on LED, ending with an alarm. | repeat, for index from 0 to, forever, loop variable |
| 1.8 | Module 1 Project: Interactive Name Badge | Combine variables, buttons, loops, and LED displays to build a fully interactive program. | Project: 'My Interactive Badge' — scrolls name on start, shows icons on button press, tracks press counts with a variable. | Full Module 1 — variables, buttons, loops, LED, show string/icon/leds |
Sensors & Input/Output
Students work with the Micro:bit's built-in sensors—temperature, light, accelerometer, compass—and add sound and radio communication to build sensing applications.
| # | Lesson Title | What Students Learn | Activity / Project | Key Blocks / Components |
|---|---|---|---|---|
| 2.1 | Temperature Sensor | Read the CPU temperature as a proxy for ambient temp. Display readings and use if-else conditional logic. | Build: 'Digital Thermometer' — display temperature values and show corresponding hot/cold icons based on thresholds. | temperature (°C), show number, if-else, >18, >26, pause |
| 2.2 | Light Sensor | Read ambient light levels (0–255). Use the LED matrix as a light sensor to trigger events based on brightness. | Build: 'Light-Sensitive Nightlight Simulator' — display 'DARK' when light < 50, and 'BRIGHT' when > 150. | light level, plot bar graph up to, if light level < 50 |
| 2.3 | Accelerometer: Tilt & Shake | Detect acceleration (x, y, z) to measure tilt, and use on shake event blocks for gesture detection. | Build: 'Tilt Direction Detector' — roll a digital die on shake, show directional arrows on left/right tilts. | on shake, on tilt left/right, on logo up/down, acceleration (x/y/z), pick random |
| 2.4 | Step Counter & Accelerometer Data | Read raw accelerometer values (z-axis) to detect motion impacts. Implement a debounce pause to avoid double counts. | Build: 'Pedometer' — increment a variable when acceleration exceeds 1200mg, preventing double counting with a 300ms pause. | acceleration (z), > 1200, change steps by 1, pause 300 (debounce), running time |
| 2.5 | Compass & Direction | Read magnetic direction (0–359 degrees). Calibrate the compass and map degree ranges to N, E, S, W. | Build: 'Digital Compass' — calibrate, read heading, and display abbreviation letters (N, E, S, W) on the LED matrix. | compass heading, calibrate compass, heading ranges 0–359, if-else chain |
| 2.6 | Sound & the Buzzer | Generate sounds using the built-in speaker or external buzzer on pin 0. Compose simple tunes with frequencies/beats. | Build: 'Musical Micro:bit' — buttons trigger built-in melodies or a custom 5-note tune. Shake for random tones. | play tone, rest, play melody, Middle C, frequency, beat duration |
| 2.7 | Radio Communication | Send and receive wireless messages between boards. Set radio groups to isolate communication. | Paired Activity: Create a 2-board messenger. Board A sends greetings (or temp data); Board B receives and displays it. | radio set group, radio send string, on radio received (receivedString) |
| 2.8 | Module 2 Project: Environmental Monitor | Apply temperature, light, and accelerometer sensors alongside radio communication in a cohesive device. | Project: 'Smart Environment Monitor' — cycles through temp/light/steps. Button resets steps. Shaking broadcasts temp via radio. | Full Module 2 — temperature, light, accelerometer, compass, sound, radio |
Controlling Motors & Basic Robotics Projects
Students connect the Micro:bit to external hardware: LEDs, buzzers, servo motors, and DC motors. They assemble a two-wheel robot with obstacle avoidance capabilities.
| # | Lesson Title | What Students Learn | Activity / Project | Key Blocks / Components |
|---|---|---|---|---|
| 3.1 | Understanding Pins & Electrical Circuits | Introduce edge connector pins (0, 1, 2, 3V, GND). Connect basic circuits (LED + resistor) with crocodile clips. | Circuit Lab: Connect an external LED to Pin 0. Write a blink program using digital write pin high/low. | digital write pin P0 high/low, analog write pin, GND, 3V, resistor, crocodile clips |
| 3.2 | Controlling External LEDs | Control multiple external LEDs via digital pins. Control brightness using analog write (PWM). | Build: 'Traffic Light Controller' — connect Red/Amber/Green LEDs on a breadboard. Program a full timed traffic light sequence. | digital write pin P0/P1/P2, analog write pin (0–1023), traffic light sequence |
| 3.3 | Buzzers & Sound Output | Connect active/passive buzzers to Pin 0. Trigger basic alarm beeps or programmed tone sequences. | Build: 'Alarm System' — button press triggers an alternating buzzer sequence and LED alert. Trigger automatically in dark environments. | digital write pin P0, active buzzer, passive buzzer, play tone on pin |
| 3.4 | Servo Motors: Controlled Movement | Control servo motors (0°–180°) using PWM signals via servo write pin. | Build: 'Servo Arm Controller' — buttons move servo to 0°, 90°, and 180°. Create a smooth sweeping loop. | servo write pin P0 to angle (0–180), sweep animation, pin connections |
| 3.5 | DC Motors & Motor Drivers | Understand DC motors for continuous rotation. Use motor drivers (L298N/extensions) since Micro:bit lacks current capacity. | Build: 'Spin and Stop Motor' — use a motor driver to control DC motor direction (forward/reverse) and speed. | motor driver, extension board, analog write (speed), digital write (direction) |
| 3.6 | Building a Simple Moving Robot | Assemble a 2-wheel chassis (motors + driver). Program forward, reverse, and turning logic. Calibrate drift. | Build: 'Two-Wheel Robot' — program button and tilt controls to drive a physical 2-wheel robot. Calibrate for straight movement. | two-motor forward/back/turn, motor calibration, accelerometer-based steering |
| 3.7 | Sensors on the Robot: Obstacle Avoidance | Add an ultrasonic sensor (HC-SR04). Read distance and apply if-else logic to trigger stop-and-turn behaviour. | Build: 'Obstacle-Avoiding Robot' — if distance < 15cm: stop, reverse, and turn right before continuing forward. | ultrasonic sensor, distance reading, if distance < 15, stop/reverse/turn sequence |
| 3.8 | Module 3 Project: Line-Following Robot | Add IR line sensors. Use dual-sensor logic (left/right on line) to continuously steer the robot along a path. | Build: 'Line Follower Robot' — if left sensor on line, turn left. If right, turn right. Test navigating a black track. | IR sensor, digital read pin, line detection logic, PD control (concept) |
Mini Robotics Project
Students work in teams to design, build, program, test, and present a complete mini-robotics project demonstrating the full engineering design cycle.
| # | Lesson Title | What Students Learn | Activity / Project | Key Blocks / Components |
|---|---|---|---|---|
| 4.1 | Project Briefing & Team Formation | Teams of 2-3 brainstorm robotics solutions using the Micro:bit and ≥3 hardware components. | Ideation Workshop: Brainstorm 3 ideas via mind map. Pitch the top idea (problem, components, blocks) for approval. | Project planning, team roles, component list, mind map |
| 4.2 | Project Design & Planning | Complete a Project Design Sheet with circuit diagrams, program flowcharts, and component lists. | Design Deliverable: Submit drawn circuit diagrams, a flowchart of event triggers, and a build timeline for sign-off. | Circuit diagram, program flowchart, component list, build plan |
| 4.3 | Hardware Build & Circuit Assembly | Assemble hardware systematically. Test individual components before integrating them into a master circuit. | Build Sprint: Assemble the breadboard/chassis. Test motors/sensors independently, then complete the full circuit for teacher review. | Breadboard wiring, crocodile clips, component testing, circuit verification |
| 4.4 | Programming the Core Logic | Write the primary MakeCode logic. Implement main event handlers, loops, and hardware outputs. | Build Sprint: Write and flash the core program. Verify the main functionality works with the assembled hardware. | Event handlers, variables, if-else, forever loop, digital/analog write |
| 4.5 | Sensor Integration & Feedback | Calibrate sensor thresholds. Add LED/sound feedback to communicate robot states to the user. Test boundary conditions. | Integration Sprint: Calibrate sensors. Run 5 test scenarios, recording passes/fails, and fix critical failures. | Sensor threshold calibration, LED feedback, sound feedback, edge case testing |
| 4.6 | Testing, Debugging & Refinement | Systematically debug using the simulator, temporary show number blocks, and serial console output. | Debug Lab: Work through a checklist. Use show number to inspect live variable states mid-program. Fix ≥2 bugs. | Simulator debugging, show number (debug), serial output, systematic testing |
| 4.7 | Presentation Preparation & Peer Testing | Prepare a project presentation. Conduct peer testing to gather user feedback on edge cases. | Peer Test Session: Swap robots. Run peer tests for unexpected inputs. Gather feedback and refine the project. | Peer testing, user scenarios, presentation structure |
| 4.8 | Final Presentation Day | Deliver a live demonstration covering circuit logic, programming, challenges overcome, and future iterations. | Final Demo: 4-minute live demonstration + 2-minute Q&A per team. Certificates awarded. | Full course — Micro:bit, sensors, actuators, MakeCode |
Teaching Notes & Tips
Pacing Guidance
Each module contains 8 lessons (~50–60 mins), totalling ~36 hours. Hardware lessons (3.5–3.8) depend on component availability. Allow extra time for robot assembly (3.6) and final project hardware builds (4.3).
Differentiation
Advanced students can explore Python mode in MakeCode, PID control for smoother movement, or radio mesh networks. Students needing support can focus on LEDs and pre-assembled chassis wiring.
Assessment Criteria
Final project assessed on: (1) Hardware Assembly (safe, working circuits). (2) Program Logic (correct loops/variables). (3) Sensor Integration. (4) Output Response. (5) Teamwork & Communication.
Tools & Equipment
Software: makecode.microbit.org (browser-based). Hardware: Micro:bit v2, crocodile clips, breadboards, LEDs, buzzers, SG90 servos, DC motors, motor driver boards, ultrasonic/IR sensors, and robot chassis kits.
Final Project Ideas for Teams
Smart Room Monitor (temp/light + radio broadcast), Security Guard Robot (ultrasonic avoidance + alarm), Plant Watering Alarm (moisture triggers LED/sound), Remote-Controlled Robot (two Micro:bits via radio).
Safety & Classroom Guidelines
Always connect GND before power. Do not exceed 3V on pins. Motors require a dedicated driver—do not connect directly to Micro:bit pins. Ensure crocodile clips do not short-circuit. Insulate loose wires.
Robotics with Micro:bit · Beginner · Ages 11–13 · © Course Curriculum
Enroll Your Child Now