Home · Academy · Robotics & Coding · micro:bit · Meet the micro:bit

Meet the micro:bit

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

LESSON COMPASS

What will you use this page for?

Core idea

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.

Evidence to produce

Complete the page task with your own input, test conditions and reasoning.

Control trap

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…

Next connection

The MakeCode Interface: We will explore the free editor where you can build your first program with drag-and-drop blocks.

Module sources: Python Tutorial · Arduino Learn

LevelBeginner
Age10–16
Duration35–50 min
PrerequisiteAlgorithms and basic block coding
ContentIn-depth guide · 1,819 words
Last updated

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:

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:

  1. Over a USB cable: While connected to a computer, it is both powered and programmed.
  2. From the battery connector: It runs as a portable device on two AAA batteries.
  3. 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.

  1. Hold a micro:bit board (or a photo of one) in your hand.
  2. 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.
  3. 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.)
  4. 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

Review questions

  1. Which micro:bit parts can provide input without adding an external component?
  2. What is the difference between the LED matrix as an output and as a light sensor?
  3. Why should pin names in a program match the physical wiring plan?
  4. What information should be checked before powering an external component from a micro:bit pin?
  5. How can a first program prove that the board, cable and editor are working together?
  6. What evidence belongs in a micro:bit project record?

Answers

  1. Buttons, the accelerometer, compass, temperature estimate, light sensing through the LED matrix and touch-capable pins can provide built-in input.
  2. As an output it displays light patterns; as an input the matrix can estimate ambient light by measuring how its LEDs respond.
  3. A mismatch makes the software read or drive a different electrical connection from the one intended.
  4. Check voltage, current demand, pin capability and whether a driver or separate power source is required.
  5. A tiny program such as showing an icon or reacting to button A confirms successful transfer and basic input/output.
  6. Record the editor, board version, wiring, code version, test cases, observed behaviour and any changes made after failure.

Lesson summary

Check your understanding

  1. What are the 25 lights on the front of the micro:bit called?
  2. What are the names of the two buttons on the board?
  3. Which sensor measures the board's movement and tilt?
  4. Write two different ways to give the micro:bit power.
  5. Does a button provide "input" or "output"? Why?

Answers

  1. These lights are called the 5×5 LED matrix; each of the 25 lights can be switched on separately.
  2. The buttons are named A and B.
  3. Movement and tilt are measured by the accelerometer.
  4. With a USB cable and with two AAA batteries in the battery connector. (The 3V pin is also accepted for advanced projects.)
  5. 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.

Start QuizBack to micro:bit
QUESTION POOL

Reinforce this lesson with 10 questions

This lesson has a pool of 20 questions. Each attempt selects 10 and reshuffles the choices.