🎮

Reaction Speed Game

Builder · Ages 10–12

  1. 1Read the conceptLearn the big idea behind this project.
  2. 2Check the partsSee which parts the robot needs.
  3. 3Follow the build stepsBuild it step by step, then test it.
  4. 4Answer the quizTap one answer for each of the 10 questions to earn XP.

💡 The concept

The game waits a random time — so nobody can cheat — then flashes the 'GO!' light. The first player to slap their button wins the round. Inside, the microcontroller counts time in milliseconds using millis(); measuring how fast something happens is called timing.

Parts you need

  • 2 buttons (one per player)
  • LED + 220Ω resistor
  • Buzzer
  • Microcontroller
  • Battery

🔎 Parts specification

Exactly what each part is, which models to buy, and what it does.

Microcontroller▸

Suggested models: BBC micro:bit V2 or Arduino Uno R3

Features: The micro:bit is perfect: its display can show the score and it has built-in radio for a wireless version. Needs 2 digital inputs for the player buttons and 1 output for the LED.

Buttons▸

Suggested models: 2× mini push buttons

Features: One per player, wired from each pin to ground. With INPUT_PULLUP each reads LOW while pressed, so the code just waits for the first one to change.

LED + resistor▸

Suggested models: 5mm LED (any bright colour) + 220Ω

Features: The 'GO!' signal. Bright colours are easiest to see at the back of the classroom.

Buzzer▸

Suggested models: Active piezo buzzer

Features: Optional but fun: a short beep marks the start and a longer beep announces the winner.

💻 Program the microcontroller

📲 App to use: Microsoft MakeCode for micro:bit, or Arduino IDE for Arduino Uno

On the micro:bit use the built-in buttons A and B and show the winner's name on the LED display — no extra parts needed!

// Arduino IDE (C++) — Reaction Game
const int LED = 9, BUZZ = 8, P1 = 2, P2 = 3;

void loop() {
  digitalWrite(LED, LOW);        // not ready
  delay(random(2000, 6000));     // sneaky wait
  digitalWrite(LED, HIGH);       // GO!
  while (digitalRead(P1) && digitalRead(P2)) {
    // wait for the first press
  }
  tone(BUZZ, 1200, 400);         // winner beep
  delay(3000);                   // celebrate
}

🧠 How it works: random(2000, 6000) waits between 2 and 6 seconds so nobody can pre-press. When the LED lights, the while loop checks both buttons thousands of times a second and stops at the first press. Level it up: save millis() when the light flashes and again when a button is pressed — the difference is that player's reaction time in milliseconds.

🛠️ Build it step by step

Press Play to watch every part go into place and every wire connect. Ask a grown-up to help with real wiring!

+ −BatteryMicrocontroller

Step 1 of 6

🔋 Power the board

Connect the battery to the microcontroller. Keep it switched OFF while you build.

🧠 Project quiz

Question 1/10⭐ 0

Why wait a RANDOM time before the GO light?