These are the blocks this course uses — all of them. Every picture here is drawn by the same renderer as the lessons, so a block looks the same wherever you meet it. If a block is not on this page, it does not appear in a chapter.

🚗 Cutebot — the robot car

The blocks that come with the Cutebot extension. These are the ones that make wheels turn, headlights glow, and sensors report what the car can see.

reverseLevel 1

Both wheels turn the other way, so the car reverses.

You see: The car backs up for one second.

go straightLevel 1

Both wheels start turning forward, and they keep turning.

You see: The car drives straight ahead for two seconds, then stops and stays stopped.

on IR receivingLevel 5

Runs the blocks inside whenever the remote sends something.

You see: Nothing until you press the remote, then the blocks inside run once.

stop carLevel 5

Switches both motors off right now.

You see: The car drives for one second and then stands still.

turn leftLevel 5

One wheel stops and the other drives, so the car pivots to the left.

You see: The car pivots left. Half a second is roughly a quarter turn on a smooth floor.

turn rightLevel 5

One wheel stops and the other drives, so the car pivots to the right.

You see: The car pivots right, about a quarter turn in half a second.

headlights colorLevel 2

Turns a headlight on in the color you pick.

You see: The headlight you named glows in that color until you change it.

headlights R G BLevel 2

Mixes your own headlight color from red, green, and blue amounts.

You see: The headlight shows the mixed color — 255 is full and 0 is off.

IR button pressedLevel 5

Checks which button on the remote was pressed.

You see: True only for the button you named, and false for every other one.

set wheel speedsLevel 1

Sets how fast each wheel turns, left and right, from -100 to 100.

You see: The car drives in a wide curve to the right, because the left wheel is faster than the right one.

tracking state isLevel 3

Checks both line sensors at the same time.

You see: True only for the pattern you picked, like left on the line and right off it.

sonar distanceLevel 4

Measures how far away the thing in front of the car is.

You see: A number in centimeters or inches — the sonar reads from 2 cm to 400 cm.

🌈 Rainbow lights under the car

Two color lights on pin P15. They come from the NeoPixel extension, not from Cutebot.

colorLevel 2

A ready-made color you can drop into a rainbow block.

You see: One color value, like red or green.

NeoPixel at pinLevel 2

Gets the rainbow lights ready, which you do once at the start.

You see: Nothing on its own. Here the next block turns both lights blue.

set pixel colorLevel 2

Picks the color for one rainbow light without showing it yet.

You see: The first light turns red, but only because the show block runs after it.

showLevel 2

Sends the colors you picked to the lights.

You see: The rainbow lights under the car change to the colors you set.

🧱 Basic

The blocks almost every program starts with.

foreverLevel 1

Everything inside runs again and again, without stopping.

You see: A heart that blinks on and off, about once a second, and never stops.

on startLevel 1

Everything here runs one time, the moment the micro:bit wakes up.

You see: The letters H and I slide across the screen once, then the screen goes dark.

pause (ms)Level 1

Makes the micro:bit wait before doing the next thing.

You see: A happy face, a two second wait, then a sad face.

show iconLevel 1

Puts one of the built-in pictures on the 25 lights.

You see: A smiling face made of lit dots. It holds for about 0.6 seconds, then stays on screen until something else is shown.

🎮 Input

Buttons, shaking, tilting, light — the ways the micro:bit notices you.

light levelLevel 2

Reads how bright the room is, from 0 to 255.

You see: A small number in the dark and a big number in the light.

on button pressedLevel 1

Runs the blocks inside only when someone presses that button.

You see: Nothing until you press A on the simulator board. Then a tick mark appears.

acceleration (mg)Level 5

Reads the pull on the micro:bit along one axis — tilt it and the number changes.

You see: About 0 when it lies still and flat, and about 1000 straight down.

📡 Radio

One micro:bit talking to another with no wires.

radio send numberLevel 5

Sends one number over the radio.

You see: The other micro:bit on the same group receives that number.

radio set groupLevel 5

Puts this micro:bit on one radio channel, from 0 to 255.

You see: Nothing on its own, but now it only hears micro:bits on the same group.

on radio received (number)Level 5

Runs the blocks inside when a number arrives.

You see: Nothing until a number comes in, then the blocks inside run.

on radio received (name, value)Level 5

Runs the blocks inside when a name and number arrive together.

You see: Nothing until a message comes in, then the blocks inside run.

radio send valueLevel 5

Sends a name and a number together.

You see: The other micro:bit receives both parts in one message.

🔁 Loops

Doing the same thing more than once.

repeat timesLevel 2

Runs the blocks inside a set number of times.

You see: The blocks inside run again and again until the count is finished.

🔀 Logic

Choosing between paths, and testing whether something is true.

andLevel 4

True only when both tests are true.

You see: True or false for the pair of tests together.

= ≠ < > ≤ ≥Level 1

Compares two numbers.

You see: True or false, which you drop into an if block.

else ifLevel 4

Adds another test for when the one above it was false.

You see: The first test that is true wins and the rest are skipped.

if then elseLevel 1

Picks one of two paths, one for true and one for false.

You see: Exactly one of the two groups runs, never both.

📦 Variables

Named boxes that remember a value.

change byLevel 1

Adds an amount to what is already in the variable.

You see: The variable grows by that amount every time the block runs.

set toLevel 1

Puts a value into a named box you can read again later.

You see: Nothing on the screen, but the value is now stored under that name.

🔢 Math

Numbers and arithmetic.

+ - × ÷Level 5

Adds, subtracts, multiplies, or divides two numbers.

You see: One number, which you drop into another block.

pick randomLevel 1

Picks a random whole number between two numbers.

You see: The car drives off at a different speed and curve most times you run it.