One-sentence summary
The micro:bit is a palm-sized educational board with lights, buttons and sensors built in, and by writing code you can turn it into a small device of your own.
Why it matters
So far you have learned to design algorithms, write code in Scratch and Python, build a web page, and work with circuits and sensors. In the previous lesson you built a distance warning system on a breadboard.
The micro:bit brings those two worlds together on a single board. Its screen, buttons and sensors are already there, so you can try out ideas right away without soldering a circuit yourself. The code you write no longer stays on a screen; it becomes the behaviour of a device you hold in your hand.
In this lesson we will not write code yet. First we will get to know the board: what is on it, where it is used, and how you give it power. In the lessons that follow we will program these parts one by one.
What is a micro:bit?
The micro:bit is a small board computer designed so that students can write code easily. It was developed for education in the United Kingdom and is a little smaller than a credit card.
Unlike a desktop computer, it has no screen, keyboard or operating system. Instead, lights, buttons and sensors are built directly onto the board. You write a program, load it onto the board over a USB cable, and the board runs that program on its own.
Short definition: A micro:bit is a small programmable board that takes input (buttons and sensors) and produces output (light, sound, radio).
The board has two sides. The front holds the lights and two large buttons. The back holds the brain (processor), the sensors, the USB port and the battery connector.
What is on the board?
The 5×5 LED matrix
The 25 tiny lights on the front are called the LED matrix. They are arranged in 5 rows and 5 columns. Because you can switch each light on and off separately, you can show simple pictures such as letters, numbers, a heart or an arrow.
This screen is not colour and cannot show photographs. But it is more than enough to spell a name, point in a direction, or draw a smiling face.
The A and B buttons
On each side of the screen there are two buttons named A and B. These are the board's simplest input: when the user presses a button, the program notices it and responds.
For example, you can set up a behaviour like "show a heart when A is pressed, show a name when B is pressed." Pressing both buttons at once can even act as a third command.
The sensors
The micro:bit senses its surroundings with several sensors:
- Accelerometer: Measures the board's movement and tilt. It can tell when you shake it or turn it over.
- Temperature sensor: Measures the temperature near the processor, giving a rough idea of how warm the room is.
- Light sensor: Uses the LEDs to sense whether the surroundings are bright or dark.
- Compass (magnetometer): Measures the magnetic field, which helps with finding direction.
Thanks to these sensors, the board can react not only to a button, but also to movement, light or temperature.
The radio
Inside the micro:bit there is a small radio. This lets two micro:bits send wireless messages to each other. One board sends a number or a short word, and the other board receives it and shows it on its screen.
This makes it possible for two friends in class to set up simple messaging between their boards, or for one board to trigger another from a distance.
The pins
The metal strips along the bottom edge are called pins. The large ones are labelled 0, 1, 2, 3V and GND. You can connect outside parts to these pins with crocodile-clip wires: a button, an LED, a buzzer or a soil-moisture sensor, for example.
So the micro:bit is not limited to the parts on it; through the pins you can extend it using the circuit knowledge you learned earlier.
The USB port and battery connector
On the top edge there is a USB port. You connect it to a computer here to load your program, and the same cable powers the board.
On the back there is a battery connector. You can unplug the board from the computer and run it on two AAA batteries. That way you can put your device in a bag and carry it, or fit it into a project.
Where is it used and how is it powered?
Two everyday examples
Example 1: A name badge. Imagine a badge you pin to your shirt at a school event. Your name scrolls across the LED matrix again and again. Nobody wrote it on paper; the small board shows your name from the program you wrote. Thanks to its battery, it runs without being plugged into a computer.
Example 2: A step-counting wristband. The accelerometer can count each swing as a step. If you fasten the board securely to your arm, you get a simple counter that shows how many steps you take as you walk. With the same idea you could make a dice (shake it, show a random number) or a temperature display.
What these examples share is this: an input is taken (movement, a button press), a rule is applied, and then an output is produced (light, a number). This loop is the basis of every project you will build in this module.
How do we power the board?
You can give the micro:bit power in three ways:
- Over a USB cable: While connected to a computer, it is both powered and programmed.
- From the battery connector: It runs as a portable device on two AAA batteries.
- Through a pin: In advanced projects a steady low voltage can be supplied to the 3V pin; only try this way with an adult.
The board runs on low voltage. It must never be connected to a wall socket or mains electricity.
A first idea: saying "HELLO"
The first classic program in this module is to show a greeting on the screen. We are not writing code yet, but let us look at how the idea appears.
As a MakeCode block sequence:
on start
show "HELLO"
forever
if <button A is pressed> then
show heart icon
The same idea in MicroPython:
from microbit import *
display.scroll("HELLO")
while True:
if button_a.is_pressed():
display.show(Image.HEART)
In both languages the logic is the same: when the board turns on, "HELLO" scrolls across, and then if button A is pressed a heart appears. Only the way it is written differs. You will build this program yourself, step by step, in the coming lessons.
Mini activity
This is an exploration task; you do not need to write code yet.
- Hold a micro:bit board (or a photo of one) in your hand.
- Find and point to each of these parts one by one: the LED matrix, button A, button B, the USB port, the battery connector, and the pins along the bottom edge.
- For each part, write one sentence: "Is this part an input or an output?" (For example, a button is an input, and the LED matrix is an output.)
- Think of an idea of your own: if you turned the micro:bit into a device, what would it do? Describe its input and its output in one sentence.
Example: "A night light that turns on in the dark: input is the light sensor, output is the LED matrix."
Common mistakes
Thinking the board is a full computer
The micro:bit has no operating system, mouse or keyboard. It is not a desktop computer; it is a small board that runs a single program.
Thinking the screen is colour
The LED matrix is single-colour and has only 25 lights. It does not show photographs or colour pictures; it is made for letters, numbers and simple icons.
Powering it the wrong way
The board is powered only through USB, the battery connector, or a low-voltage pin. It must never be plugged into a wall socket or a high-voltage source.
Mixing up input and output
Buttons and sensors take in information (input); the LEDs, sound and radio produce information (output). When you plan a project, telling them apart makes your work easier.
Safety note
- Connect the battery pack and any outside parts together with an adult.
- Use only the low-voltage sources the board recommends; never connect it to mains electricity.
- Put batteries in the right way round; do not use a battery that gets hot, swells or leaks, and tell an adult.
- In projects that attach the board to a wrist or a bike, fasten the part securely. Looking at a device while cycling can distract you; do not look at the screen while riding.
- When clipping crocodile wires to the metal pins, make sure the wires do not touch each other and cause a short circuit.
Review questions
- Which micro:bit parts can provide input without adding an external component?
- What is the difference between the LED matrix as an output and as a light sensor?
- Why should pin names in a program match the physical wiring plan?
- What information should be checked before powering an external component from a micro:bit pin?
- How can a first program prove that the board, cable and editor are working together?
- What evidence belongs in a micro:bit project record?
Answers
- Buttons, the accelerometer, compass, temperature estimate, light sensing through the LED matrix and touch-capable pins can provide built-in input.
- As an output it displays light patterns; as an input the matrix can estimate ambient light by measuring how its LEDs respond.
- A mismatch makes the software read or drive a different electrical connection from the one intended.
- Check voltage, current demand, pin capability and whether a driver or separate power source is required.
- A tiny program such as showing an icon or reacting to button A confirms successful transfer and basic input/output.
- Record the editor, board version, wiring, code version, test cases, observed behaviour and any changes made after failure.
Lesson summary
- The micro:bit is a palm-sized educational board that comes with lights, buttons and sensors built in.
- The front holds the 5×5 LED matrix and the A and B buttons; the back holds the processor, sensors, USB port and battery connector.
- The board takes input (buttons, sensors) and produces output (light, sound, radio).
- Power comes from USB, two AAA batteries, or a low-voltage pin; it is never plugged into a wall socket.
- The first classic idea is to scroll "HELLO" on the screen and draw a heart when button A is pressed.
Check your understanding
- What are the 25 lights on the front of the micro:bit called?
- What are the names of the two buttons on the board?
- Which sensor measures the board's movement and tilt?
- Write two different ways to give the micro:bit power.
- Does a button provide "input" or "output"? Why?
Answers
- These lights are called the 5×5 LED matrix; each of the 25 lights can be switched on separately.
- The buttons are named A and B.
- Movement and tilt are measured by the accelerometer.
- With a USB cable and with two AAA batteries in the battery connector. (The 3V pin is also accepted for advanced projects.)
- A button provides input, because it takes information from the user (pressed or not pressed), and the board produces an output in response.
Source and verification note
For “Meet the micro:bit”, verification focuses on whether the relationship between What is a micro:bit? and The 5×5 LED matrix remains consistent across examples. MakeCode and MicroPython names can vary slightly by version. Test in the simulator first; when external components are connected, check the board’s pin and voltage limits separately.
Next lesson
The MakeCode Interface: We will explore the free editor where you can build your first program with drag-and-drop blocks.