Every lesson so far with the micro:bit, in order, followed by nine games to build. Open one to see what you need, the steps, the blocks and something to try next. All of the building happens at makecode.microbit.org.
name-badge.

Press A and your name plays across the LEDs four times, with a short gap between each run.
The idea. The button is the input, the loop is the process and the LEDs are the output.
B Clicks. A variable is a box with a name on it. In on start, put set B Clicks to 0.

Three presses of B show nothing. The fourth shows a heart for one second. Four more presses show it again.
The idea. Remembering needs a variable. Checking needs a condition.
Shakes that goes up by 1 on every shake, and an icon on the third shake.You leave with one game chosen and a reason for choosing it.
A finished packet that another person could build your game from.
The idea. The packet is marked on how clearly it explains your plan.


Your game runs on a real micro:bit, and its link is in the build thread.
Your game has been played by people who did not build it, and you have one idea to borrow from someone else's.
Nine games like the ones Year 8 built for the Mini Project. Each one explains how the game works, then gives the basic steps. Build one, then make it your own.
You ask a yes-or-no question out loud and shake the micro:bit. It picks a random number, and each number has its own answer. The player sees the answer scroll past and never sees the number.
answer.answer to pick random 0 to 4. That gives five possible numbers: 0, 1, 2, 3 and 4.answer = 0.

Each shake scrolls one of the five answers across the screen.
The idea. A random number chooses, and if … else if turns the number into words.
Two players count to three and shake their micro:bits together. Each micro:bit picks 1, 2 or 3 at random and shows a picture: a small square for rock, a large square for paper, or scissors. The players decide who won.
hand.hand to pick random 1 to 3.hand = 1, then hand = 2, and leave the else for 3.
Each shake shows rock, paper or scissors.
The idea. The same shape as the Magic 8 Ball, with pictures in place of words.
The whole game is one event. A shake picks a random number from 1 to 6 and shows it, so the micro:bit can stand in for the dice in any board game.

Each shake shows a number from 1 to 6.
The idea. A block that gives a value can go straight into the gap of another block.
Press A and pass the micro:bit round the circle. It has secretly chosen a number of seconds between 5 and 15 and is counting down. When the count reaches 0 a skull appears, and whoever is holding it is out.
timer.timer to pick random 5 to 15 and show an icon that means the game is running.timer > 0. A while loop keeps repeating for as long as its condition is true.
The chessboard icon shows while the potato is hot. After 5 to 15 seconds the skull appears.
The idea. A while loop repeats until something changes, and here the loop itself makes the change.
The micro:bit remembers two numbers, one for each team. Button A adds a point for the home team and button B adds one for the away team. Pressing both together starts a new match.
home and away. Set both to 0 in on start.home in the gap.away.
Each press shows that team's new score. A and B together sets both back to 0.
The idea. One variable for each thing the game has to remember.
Press A and the micro:bit counts 3, 2, 1, then waits for a random time and lights one dot. Press B as fast as you can. The micro:bit shows how many milliseconds you took: 1000 milliseconds is one second.
start and running.start to running time (ms), set running to true and plot x 2 y 2. Running time is the micro:bit's own stopwatch.running to false and show running time (ms) minus start.
A dot appears after a wait of 1 to 3 seconds. Pressing B scrolls your time, usually between 200 and 400.
The idea. running is a true-or-false variable. It lets B work only while a round is on.
best and show it on shake.You are a dot on the bottom row, moved left with A and right with B. Another dot appears somewhere on the top row and falls one row at a time. If it lands on you, you score a point.
player to create sprite at x: 2 y: 4. A sprite is a dot the game can move and test.item to a new sprite at a random x from 0 to 4, with y 0, and pause.
Dots fall one after another, and each catch adds a point.
The idea. The 5 × 5 screen is a grid. x counts across from 0 to 4 and y counts down from 0 to 4.
Hold the micro:bit upright on your forehead so that only your friends can read it. They give clues and you guess the word. Tip it face down for a correct guess, which scores a point, or face up to pass, which costs a life. Stand it upright again for the next word. A countdown ends the game after 30 seconds.
wordList to an array of words. An array is a list kept in one variable. Then add start countdown (ms) 30000.index to a random number from 0 to length of array wordList minus 1. Positions in a list start at 0, so a list of five words has positions 0 to 4.
Each time the micro:bit stands upright a word scrolls across. When the 30 seconds are up it shows the score.
The idea. The micro:bit knows which way up it is, so tilting it works like three more buttons.
Each press of A draws a card worth 1 to 10 and adds it to your total. You choose when to stop. Go over 21 and the game is over. The player who stops closest to 21 wins.
score and card. Set score to 0 in on start.card to pick random 1 to 10, then change score by card.score > 21. In then, show GAME OVER and set the score back to 0. In else, show the score.score to 0 and show 0, ready for the next player.
The total climbs with each press of A. Above 21 it scrolls GAME OVER and starts again from 0.
The idea. change score by card adds a different amount each time, because the amount is itself a variable.