02micro:bit ยท MakeCode 25 minutes
A/B counter
Count up with A, down with B, and reset with both together.

Lesson goal: Store a number in a variable, change it from button events and show it on the display.
Open MakeCodeSection 1
Understand
- variable
- change by
- event handlers
- show number
- A+B event
- 1A variable stores the count.
- 2Button A adds one, button B takes one away.
- 3Each press is an event that runs its own blocks.
Safety first
- No wiring.