← micro:bit and the computer: projects

A press counter

Open project · after lesson 2: Commands from the computer

Make a counter that lives on both sides. The micro:bit counts every press of button A and sends the count. Your own web page shows it big, and has a Reset button that tells the micro:bit to start again from 0.

A good counter never loses count: if the page opens late, the next press still shows the right number.

One way it could look
One way it could look. Yours will be different.

Ways it could look when it works

These show a finished project at about the level to aim for. Yours will be different, and that is fine.

A plain counter that has counted 12 presses
A plain counter that has counted 12 presses
A door counter that turns red above 25
A door counter that turns red above 25

You'll use

These light up when your code uses them. Click one to see where you learned it.

The micro:bit

The web page

The micro:bit

Try it yourselfYour edits are saved in this browser.
It takes a few seconds to load. Your work in this step is kept.

The web page

Try it yourselfYour edits are saved in this browser.

Milestones

Tick each one when it is true of your project. Nobody marks it: be honest with yourself.

Make it yours

Looking back

Tick every milestone first.

micro:bit and the computer · project badge

★ A press counter

Built with

Milestones

The hardest part