Complete for freeBeginner

Course 9

Hardware Lab: micro:bit Inventions

You program the BBC micro:bit in Microsoft MakeCode, a free browser editor whose built-in simulator runs every program in the course, so no hardware is required. After a setup module, each core module pairs a notes lesson that teaches the ideas with a build-along that makes one working invention, then a set of practice problems with hints and full solutions. You start with buttons, the LED screen, and events, then read the accelerometer, compass, light, temperature, and microphone, send radio messages between boards, compare MakeCode with MicroPython, collect sensor data, and finish by designing, testing, and documenting a connected invention of your own. Programs are shown as MakeCode JavaScript that you can paste into the editor and view as blocks.

Free completion promise: Every lesson, exercise, and project runs in the free MakeCode simulator in a web browser, with no account, download, or purchase needed. A real micro:bit is an optional extra.

What's inside

  • 24hand-written lessons
  • 23videos
  • 6step-through animations
  • 31diagrams, charts & live previews
  • 49quiz questions
  • 158code examples

Before you begin

Requirements & setup for Hardware Lab: micro:bit Inventions

Start with the complete free pathway below. Hardware, subscriptions, paid APIs, and cloud credits are never required.

Start here ยท free path

Your complete $0 setup

Every lesson, exercise, and project runs in the free MakeCode simulator in a web browser, with no account, download, or purchase needed. A real micro:bit is an optional extra.

$0 required

Setup checklist

0 of 14 complete

This checklist is a temporary setup aid and resets when the page reloads. Saved course progress begins in the setup lessons below.

  1. Everything required for this course is free. Paid software, APIs, cloud credits, GPUs, and physical equipment are optional.

    About 2 min
  2. Open makecode.microbit.org in Chrome, Edge, Firefox, or Safari (Chrome or Edge if you'll connect a real board).

  3. Under My Projects, click New Project, type a name such as c4t-hello, and click Create.

    About 5 min
  4. From the Basic category, drag a show icon block into on start.

    About 5 min
  5. Every lesson works in Microsoft MakeCode for micro:bit, so BBC micro:bit V2 is never required.

  6. If you have BBC micro:bit V2, use it where a lesson mentions it and compare your result with the lesson's.

    About 5 min
  7. If it doesn't match, finish that step in Microsoft MakeCode for micro:bit and keep going.

    About 5 min
  8. Every lesson works in Microsoft MakeCode for micro:bit, so Micro-USB data cable is never required.

  9. If you have Micro-USB data cable, use it where a lesson mentions it and compare your result with the lesson's.

    About 5 min
  10. If it doesn't match, finish that step in Microsoft MakeCode for micro:bit and keep going.

    About 5 min
  11. Every lesson works in Microsoft MakeCode for micro:bit, so Battery pack for 2 AAA batteries is never required.

  12. If you have Battery pack for 2 AAA batteries, use it where a lesson mentions it and compare your result with the lesson's.

    About 5 min
  13. If it doesn't match, finish that step in Microsoft MakeCode for micro:bit and keep going.

    About 5 min
  14. Microsoft MakeCode for micro:bit: The simulator on the left side of the editor shows a micro:bit with your chosen icon lit on its LED screen. BBC micro:bit V2: The simulator on the left side of the editor shows a micro:bit with your chosen icon lit on its LED screen. Micro-USB data cable: The simulator on the left side of the editor shows a micro:bit with your chosen icon lit on its LED screen. Battery pack for 2 AAA batteries: The simulator on the left side of the editor shows a micro:bit with your chosen icon lit on its LED screen.

    About 5 min

Software

1 item

Microsoft MakeCode for micro:bit

A free editor from Microsoft that runs in any current browser. It has blocks, JavaScript, and Python views of the same program and a built-in micro:bit simulator, so every lesson can be finished without hardware. With Chrome or Edge it can also send programs straight to a real board over USB.

Course need
Microsoft MakeCode for micro:bit
Free

A free editor from Microsoft that runs in any current browser. It has blocks, JavaScript, and Python views of the same program and a built-in micro:bit simulator, so every lesson can be finished without hardware. With Chrome or Edge it can also send programs straight to a real board over USB. Every lesson is readable text with copyable code, keyboard-friendly quizzes and step-throughs, and videos with YouTube captions.

  1. Open makecode.microbit.org in Chrome, Edge, Firefox, or Safari (Chrome or Edge if you'll connect a real board).
  2. Under My Projects, click New Project, type a name such as c4t-hello, and click Create.
  3. From the Basic category, drag a show icon block into on start.

Hardware

3 items

BBC micro:bit V2

Optional; the in-browser simulator covers every lesson. A real board lets you shake, tilt, wear, and carry your inventions. Get a V2, which adds the speaker, microphone, and touch logo.

Optional
Microsoft MakeCode for micro:bit
Free

Optional. Every lesson can be completed with Microsoft MakeCode for micro:bit; BBC micro:bit V2 is an extra for learners who have it. Optional equipment: every assessed outcome can be completed without it.

  1. Every lesson works in Microsoft MakeCode for micro:bit, so BBC micro:bit V2 is never required.
  2. If you have BBC micro:bit V2, use it where a lesson mentions it and compare your result with the lesson's.
  3. If it doesn't match, finish that step in Microsoft MakeCode for micro:bit and keep going.

Micro-USB data cable

Needed only with a real board, to send programs from the computer. Charge-only cables won't work.

Optional
Microsoft MakeCode for micro:bit
Free

Optional. Every lesson can be completed with Microsoft MakeCode for micro:bit; Micro-USB data cable is an extra for learners who have it. Optional equipment: every assessed outcome can be completed without it.

  1. Every lesson works in Microsoft MakeCode for micro:bit, so Micro-USB data cable is never required.
  2. If you have Micro-USB data cable, use it where a lesson mentions it and compare your result with the lesson's.
  3. If it doesn't match, finish that step in Microsoft MakeCode for micro:bit and keep going.

Battery pack for 2 AAA batteries

Optional, for projects you carry or wear, such as the badge and the step counter. Use alkaline batteries, not rechargeables.

Optional
Microsoft MakeCode for micro:bit
Free

Optional. Every lesson can be completed with Microsoft MakeCode for micro:bit; Battery pack for 2 AAA batteries is an extra for learners who have it. Optional equipment: every assessed outcome can be completed without it.

  1. Every lesson works in Microsoft MakeCode for micro:bit, so Battery pack for 2 AAA batteries is never required.
  2. If you have Battery pack for 2 AAA batteries, use it where a lesson mentions it and compare your result with the lesson's.
  3. If it doesn't match, finish that step in Microsoft MakeCode for micro:bit and keep going.

Accounts

Nothing required

No external account is needed for this course.

What you will be able to do

Learning outcomes

  • Set up MakeCode, test programs in the simulator, and transfer them safely to a real micro:bit.
  • Program the LED screen, buttons, and touch logo using events, loops, and variables.
  • Turn noisy accelerometer, compass, light, temperature, and sound readings into reliable decisions.
  • Exchange radio messages between micro:bits and read the same program in MakeCode and MicroPython.
  • Collect and chart sensor data, then design, test, and document a connected invention.

Build real work

Assignments & capstone

Free tools accepted

Two-player reaction duel

Build a two-player reaction duel for the micro:bit in MakeCode that waits a random time, flashes the LEDs, works out whether A or B was pressed first, punishes false starts, and keeps both scores. Test it in the MakeCode simulator.

Every lesson, exercise, and project runs in the free MakeCode simulator in a web browser, with no account, download, or purchase needed. A real micro:bit is an optional extra. Submit your project file, or screenshots with descriptions, or a short demo.

Sensor gadget with a state machine

Build a micro:bit gadget in MakeCode that reads a sensor such as the accelerometer or light level, uses a threshold with a reset margin so readings don't flicker, and runs a state machine of three or more states driven by button events.

Every lesson, exercise, and project runs in the free MakeCode simulator in a web browser, with no account, download, or purchase needed. A real micro:bit is an optional extra. Submit your project file, or screenshots with descriptions, or a short demo.

Final assessment

Connected micro:bit invention

Build a network of two or more micro:bit roles that talk by radio, such as a voting system or relay race timer, with event-driven inputs, a state machine, logged data you chart, and visible feedback when a message is lost. Deliverables: MakeCode project with 2+ radio roles, Protocol table and state diagrams, Test plan with a measured reliability rate, Data CSV with a chart and a conclusion, README with safety notes, and Three-minute demo.

Prerequisites & pacing

Skills assumed

  • Comfortable with sequences, simple loops, and if/else in Scratch or any language
  • A computer or Chromebook with a current web browser

Recommended prior courses

These are advisory, not locks. If you already have the skills listed above, enroll directly.

Choose your pace

  • self paced: 8 weeks at 3 hours per week
  • weekly: 8 weeks at 3 hours per week

Part of this learning path

  • ๐Ÿค– Hardware and Robotics ยท step 1 of 4

    Go from first LED to a connected, sensing, machine-learning device โ€” every step has a browser simulator.

Course created by Zafir Shamsi.