A learning resource from Spread Robotics Education Foundation

Lesson 01 · 55 minutes · First program

Light up a heart

Give the micro:bit one clear instruction, test it on screen, and then run it on the real board.

New programming concept

Output

An output is information a computer produces. Your program’s output is a heart shown on the 25 LED lights. It stays there because the micro:bit has not received another instruction.

  • Computer with MakeCode
  • micro:bit or simulator
  • USB data cable
AB

MakeCode steps

Build the program

  1. 1

    Open a new project

    Go to MakeCode, select New Project, and name it My Heart.

    Open MakeCode
  2. 2

    Open Basic

    In the block toolbox, select the blue Basic category.

    Basic
  3. 3

    Choose show icon

    Drag show icon into the on start block. Make sure it snaps into place.

    on start
    show icon ♥
  4. 4

    Look at the simulator

    A heart should appear. If it does not, check whether the show icon block is connected inside on start.

  5. 5

    Make one change

    Select the picture inside the block and try another icon. Then change it back to the heart.

When the simulator works

Move the program to the micro:bit

1Connect

Plug in the USB data cable.

2Download

Select the Download button.

3Transfer

Follow MakeCode’s instructions for your computer.

4Watch

Wait for the yellow light to stop flashing.

The heart did not appear
  • Check that the show icon block is inside on start.
  • Try the simulator first. If it works there, check the USB cable.
  • Some USB cables supply power but cannot transfer data. Ask the teacher for a tested cable.
  • Press the small reset button on the back once.

Optional videos

Watch, then return to the steps

The lesson works without video. Use these official micro:bit videos if an internet connection is available.

Visit the official Heart project

For the teacher

A calm 55-minute plan

Reconnect
Review code, program, LED, simulator.

Predict and demonstrate
What will “show heart” do?

Guided build
Pause and check after each step.

Transfer in teams
Expect cable and file questions.

Change and share
Try one icon, then restore the heart.

Success criteria and pacing notes

A team succeeds if it can show the heart in the simulator. Transferring to the board is a second success, not a requirement for understanding the code. Avoid introducing loops in this lesson.

Before you finish

Can you do it?