Rohan's Block Coding Path
micro:bit · MakeCode Blocks · for Rohan

Rohan's Block Coding Path

Ten levels from first button press to a program he designs and builds himself. The goal: in about six months, Rohan opens a blank MakeCode project and builds, debugs and explains a real program with functions, lists and several modes, with no help.

10levels, no schedule
~6months
1 habitrebuild every idea from a blank project

How to make a strong coder, not a block-copier

Most kids get stuck on tutorials: they follow the steps, it works, and they learn very little. Five habits make the difference. Use them at every level.

Tools: makecode.microbit.org in Blocks view, the on-screen simulator, his micro:bit V2.2, the Cutebot Pro and the Keyestudio 37-in-1 kit.

1. Use, modify, create

  1. Use: run a small program and predict what it does first.
  2. Modify: faster, reversed, two players, a different sensor.
  3. Create: build something new with the same idea, from a blank project.

Step 3 is where the learning happens.

2. Predict before running

Before every download ask: "What do you think will happen?" A wrong guess is valuable. It shows exactly what he doesn't understand yet.

3. Plan on paper (from Level 3)

  • What should it do? One sentence.
  • What does it need to remember? These become variables.
  • What events happen? Buttons, shake, timers, radio.

4. Debug like a detective

  1. Read the code out loud to a stuffed animal.
  2. Shrink it: remove blocks until the bug disappears.
  3. Show the value with show number or serial write.
  4. Slow it: add a pause or use slow-motion.
  5. Then ask for help, and say what he tried.

5. Explain it back

After each project he teaches it to you in two minutes. If he can't explain a block, he doesn't own it yet.

Your role as coach

  • Don't touch the mouse. Ask questions instead.
  • Praise debugging, not only finished projects.
  • Let him be stuck for 10 minutes before a hint.
  • Keep a project notebook: date, project, one bug he fixed and how.
Level 1

Programs are instructions, events start them

Big idea: the computer does exactly what you say, in order, and only when something triggers it.

Blocks to master · tap one for its tutorial and 10 mini projects
Challenges
  • Animated heartbeat: big heart, small heart, repeat.
  • Name badge: A shows his name, B shows a smiley.
  • A 4-frame animation he designs himself (rocket launch, winking face).
  • Doorbell: touching the logo plays a melody.
  • Find out: what changes if the animation is in on start instead of forever?

Boss project · Mood Badge

A = happy, B = sad, A+B = surprised, shake = a dizzy animation with a sound.

Level 2

Variables: the program's memory

Big idea: a variable is a labelled box that remembers a number or word while the program runs.

Blocks to master · tap one for its tutorial and 10 mini projects
Challenges
  • Step counter: shake adds 1, A shows the count, B resets to 0.
  • Dice: shake shows a random 1 to 6.
  • Board-game scorekeeper: A and B add points for two players, A+B shows both.
  • Countdown timer from 10 that plays a sound at 0.
  • Puzzle: a dice that never rolls the same number twice in a row. (He needs a second variable.)

Boss project · Rock Paper Scissors

Shake picks a random 0, 1 or 2 and shows the matching icon. Add a score variable for wins.

Level 3

Decisions: if / else and sensors

Big idea: programs make choices based on conditions. Sensors turn the real world into numbers that conditions can test.

Blocks to master · tap one for its tutorial and 10 mini projects
Challenges
  • Night light: dark means screen on, otherwise off.
  • Thermometer with a sad face above 28 °C.
  • Spirit level: tilt left shows a left arrow, right a right arrow, flat a dot. He finds the numbers by testing.
  • Compass showing N, E, S or W with a 4-way else if.
  • Clap switch: a loud sound toggles the screen. Needs a true/false variable.
  • Find out: why does if light level < 50 flicker? Fix it with two thresholds, one to turn on and one to turn off.

Boss project · Reaction Timer

Wait a random 1 to 5 seconds, show a target, then measure how fast he presses A with running time (ms). Bonus: catch anyone who presses before the target appears.

Level 4

Loops: doing things many times

Big idea: loops repeat work, and the loop counter is a variable that changes each time around.

Blocks to master · tap one for its tutorial and 10 mini projects
Challenges
  • Light every LED one at a time, row by row: a loop inside a loop.
  • Draw a diagonal line, then an X, using only for loops and plot.
  • Live bar graph of sound or light level.
  • Rain: random LEDs fall from top to bottom.
  • Flash while button A is not pressed. Then explain how while differs from if.
  • Puzzle: light only the border of the 5×5 screen with loops and one if.

Boss project · Bouncing Dot

A dot moves around the screen and bounces off the edges, using x and y variables plus direction variables dx and dy.

Level 5

States: programs with modes

Big idea: real programs have modes, like menu, playing and game over. One variable called state decides what the program is doing right now. This is the biggest jump from beginner to real coder.

No new blocks at this level. It's about organising the blocks he already knows.

Challenges
  • Traffic light: green, yellow, red with timing, plus a pedestrian button that changes the state.
  • Multi-tool: A switches mode (thermometer, compass, dice, light meter), B uses the current tool.
  • Stopwatch with start, stop and reset on only two buttons.
  • Find out: what goes wrong when two forever loops change the screen at once? How does state fix it?

Boss project · Virtual Pet

Hunger and happiness variables drop over time. A = feed, B = play, shake = wake up. States: happy, hungry, sleeping, gone. The pet must be able to recover from a bad state.

Level 6

Functions: build your own blocks

Big idea: a function packages a job under a name so it can be reused, and it keeps big programs readable. Parameters give it inputs and return gives back an answer.

Blocks to master · tap one for its tutorial and 10 mini projects
Challenges
  • flash(times) flashes the screen that many times.
  • drawSquare(size) on the LED screen.
  • isEven(n) returns true or false, used inside an if.
  • celsiusToFahrenheit(c) so the thermometer can switch units.
  • Refactor the Level 5 pet into functions. It should get shorter and clearer.

Boss project · Simon Says, part 1

Functions showArrow(direction), playNote(direction) and waitForPress(), which returns the button pressed.

Level 7

Lists: remembering many things

Big idea: a list holds many values in order, and each one is reached by its position, starting from 0.

Blocks to master · tap one for its tutorial and 10 mini projects
Challenges
  • Magic 8-ball: shake picks a random answer from a list.
  • Show every number in a list, then find the biggest with a loop.
  • Count presses of each button in a list of counts.
  • Record 10 temperature readings and show the average.
  • Puzzle: reverse a list. Then sort 5 numbers with bubble sort, his first real algorithm.

Boss project · Simon Says, complete

The sequence grows by one random step each round and lives in a list. One mistake means game over with a score. This combines events, variables, if, loops, states, functions and lists.

Level 8

Radio: micro:bits talking to each other

Big idea: two programs on two devices can work together by sending messages. This is the start of networking.

The simulator shows two micro:bits on screen as soon as a radio block is used, so a second board isn't needed to start. A second real micro:bit (about $20) makes this level much more fun.

Blocks to master · tap one for its tutorial and 10 mini projects
Challenges
  • Messenger: A sends a heart, B sends a smiley.
  • Remote doorbell.
  • Hot and cold: signal strength shows how close the other micro:bit is.
  • Two-player reaction duel where both boards agree on the winner.
  • Puzzle: design a tiny protocol. Which numbers mean what? Write it down like an engineer.

Boss project · Tilt Remote for the Cutebot Pro

One micro:bit is the controller (tilt to steer), the other rides in the car and drives. Needs the extension github.com/elecfreaks/pxt-cutebot-pro.

Level 9

The real world: pins, sensors, motors, robots

Big idea: code can read and control physical things. Real sensors are noisy, so robots need feedback: measure, decide, adjust, repeat.

Blocks to master · tap one for its tutorial and 10 mini projects
Challenges (37-in-1 kit + Cutebot)
  • Servo pointer that follows the light level or tilt, using map.
  • Alarm: the PIR or ultrasonic sensor triggers the buzzer.
  • Graph a sensor in the Data Viewer and find the noise. Smooth it by averaging the last 5 readings, using a list.
  • Cutebot drives a square, then a triangle, using functions.
  • Obstacle avoider with states: driving, backing up, turning.
  • Line follower: first simple if/else steering, then smooth steering where the turn depends on how far off the line he is. That's his first proportional control.

Boss project · pick one

A wall-following maze solver, or one of the existing projects in cutebot_pro/blocks/ (Mood Pet is easiest, then Turtle Drawing). He reads and modifies them before writing his own version.

Level 10

Thinking like a programmer

Big idea: strong coders plan, break big problems into small pieces, test each piece, and improve working code.

Blocks to master · tap one for its tutorial and 10 mini projects
Topics
  • Timing without pause: use running time so two things happen at once, like blinking an LED while reading buttons.
  • Searching and sorting: linear search, bubble sort, and counting how many steps each takes.
  • Probability: roll a dice 1,000 times in a loop, count results in a list. Is it fair?
  • Code review: read someone else's project and explain and improve it.
  • Peek at JavaScript: switch a finished project to the JavaScript tab and match lines to blocks. Just curiosity, no pressure.

Capstone · he designs it

Ideas: an arcade game with levels, lives and a high score; a weather station that logs a day of temperature and light; a two-micro:bit multiplayer game; a Cutebot that plays tag with the remote.

It must use states, functions, lists and at least one sensor, with a one-page plan written before coding and a 3-minute family demo.

Keeping it fun for a smart 10-year-old

He picks the themeSame concept, his idea. If he loves soccer, the scorekeeper becomes a soccer scoreboard.
Challenges over tutorialsGive the goal, not the steps. Smart kids get bored following instructions but love puzzles.
"Break it" sessionsSecretly plant a bug in his working program. Finding it trains debugging fast.
Show and tellDemos to family or friends. An audience makes him want to polish.
Rebuild after every tutorialTutorials are for seeing an idea. Then he builds it again from blank.
Bug Hall of FameA notebook page with the trickiest bug he fixed each month.

Common traps

Everything stuffed into one giant foreverLevel 5 (states) and Level 6 (functions)
pause everywhere, so buttons feel unresponsiveLevel 10: timing with running time
Two forever loops fighting over the screenOne loop owns the screen; the others only change variables
Copy-pasting blocks instead of making a functionThe third paste becomes a function
Thinking lists start at 1Practise get value at 0 until it's automatic
Variables used before they're setSet every variable in on start
The same loop variable name in two places at onceBlock variables are shared by the whole program, so give each loop its own name
Getting stuck and quittingThe 5 debug steps, and 10 minutes of struggle before a hint