Guided Project

Guided Project

micro:bit Reaction Timer

Wait for an unpredictable signal, press as quickly as possible, and make the timer distrust suspiciously early presses.

  • Input
  • Timing
  • Variables
  • Randomness
  • State
  • Testing

Project brief

What students build

  • A waiting state
  • Random start delay
  • Visible go signal
  • Button response
  • Measured elapsed time
  • Early-press and restart rules

What students learn

  • Microcontroller input
  • Elapsed time
  • Random delay
  • State
  • Fair tests
  • Measurement limits

What students need

  • Physical version requires a micro:bit and suitable connection method
  • A browser micro:bit simulator can support logic work

A physical build requires a micro:bit, with availability confirmed before class. The same timing logic can be worked out in a compatible browser simulator.

Suggested build order

  1. 01

    Create the waiting state

    Task: Show that the test is ready but not started.

    Checkpoint
    Button presses have a defined waiting result.
    Likely mistake
    The timer begins immediately.
  2. 02

    Add random delay

    Task: Wait an unpredictable but bounded amount.

    Checkpoint
    Several runs use different delays.
    Likely mistake
    The delay range includes unusable values.
  3. 03

    Show the go signal

    Task: Record start time and display a clear cue.

    Checkpoint
    The cue and start timestamp happen together.
    Likely mistake
    Timing begins before the cue.
  4. 04

    Measure the response

    Task: Read the button and calculate elapsed time.

    Checkpoint
    A plausible result is displayed once.
    Likely mistake
    Repeated button input overwrites the result.
  5. 05

    Handle early presses

    Task: Detect a press before GO and reset fairly.

    Checkpoint
    Cheating or mistakes produce a clear state.
    Likely mistake
    An early press is counted as a perfect score.

Test questions

  • Can the same random delay repeat?
  • What happens on an early press?
  • Can holding the button trigger GO?
  • Is time measured in the intended unit?
  • Does a new test clear the old result?

Common mistakes

  • Start time is recorded too early.
  • Button state carries into the test.
  • Units are mislabeled.
  • Old results remain active during restart.

Extension ideas

  • Store several attempts.
  • Show best and average results.
  • Add false-start count.
  • Compare two input methods and discuss fairness.

Challenge levels

LEVEL 1

Builder

Produce one reliable reaction measurement.

LEVEL 2

Inventor

Store and compare three attempts.

LEVEL 3

Boss Level

Design a fair two-player protocol and explain its limits.

What to demonstrate

  • Waiting state
  • Random delay
  • Synchronized start cue
  • Measured response
  • Early-press handling
  • One fairness limitation