Reaction Game

Reaction Game

 

The Idea

This project is a fast-paced electronic reaction game designed to test how quickly you can respond to a randomly illuminated button.

The game uses ten large illuminated push buttons arranged across the front of a custom-built enclosure. During a game, the buttons light up in random combinations and the player has to press the illuminated buttons as quickly as possible.

A large LED matrix display provides the game instructions, countdown, score and remaining game time, while sound effects provide additional feedback as the game progresses.

The project is based around an Arduino Mega 2560, which controls the buttons, LEDs, display and sound effects.


The Finished Game

The finished unit consists of a large blue enclosure with ten illuminated arcade-style push buttons.

The buttons are arranged in two groups of five and use different colours to make the control panel visually interesting.

A large LED matrix display is mounted across the top of the enclosure. This is used to display messages and the player's score.

The finished control panel contains:

  • 10 illuminated push buttons

  • Large LED matrix display

  • Start button

  • Coloured response buttons

  • Internal Arduino Mega electronics

  • Audio system

  • Battery-powered electronics

The result is a self-contained reaction game that can be played without a computer.


How the Game Works

When the game is switched on, the display shows the start screen.

The start screen alternates between:

RED = START

and the current high score.

Pressing the red start button begins a new game.

The game then displays:

GET READY!

followed by a countdown:

3
2
1
GO GO GO

The game then begins.

During the game, between one and ten of the coloured buttons are randomly illuminated.

The player must press the illuminated buttons as quickly as possible.

A correct button press:

  • Turns off that button's LED

  • Increases the player's score

  • Produces a sound effect

Pressing a button that has not been illuminated produces a different sound effect.

This gives the player immediate audio feedback as well as the visual feedback from the buttons.


Game Timing

Each game lasts approximately 41 seconds.

The time allowed to respond to each group of illuminated buttons is randomly selected.

In the normal game mode, the response time is between approximately:

0.5 and 3 seconds

This means the game constantly changes pace and prevents the player from simply following a predictable sequence.

There is also a slower Kids Mode.

When Kids Mode is selected, the response time is increased to between approximately:

3 and 6 seconds

This makes the game easier for younger players.


Scoring

Every correctly pressed illuminated button increases the score by one.

The current score is continuously shown on the LED matrix display.

The display formats the score with leading zeroes, for example:

0001

0025

0127

This makes the score easy to read during the game.

At the end of the game, the display shows:

GAME OVER

followed by the final score.

If the player has beaten the previous high score, the new high score is displayed and a special sound effect is played.

The high score is retained while the unit remains powered.


Schematic

LED Matrix Display

A large MAX7219-controlled LED dot-matrix display is used for the game's information display.

The project uses eight MAX7219 display modules, giving a long horizontal display across the top of the control panel.

The Arduino program uses the MD_Parola and MD_MAX72xx libraries to control the display.

The display is used for:

  • Start instructions

  • High score

  • Countdown

  • Game status

  • Current score

  • Remaining time

  • Game-over message

  • Battery voltage

  • Battery percentage

The display also uses a seven-segment-style numeric font while displaying the score and game timer.


The Ten Buttons

The game has ten illuminated push buttons.

Each button has two functions.

First, it provides a visual target by illuminating when the player needs to press it.

Second, it provides a physical input to the Arduino when the player presses it.

The ten button inputs are connected to the Arduino Mega using digital inputs 54–63.

The Arduino uses its internal pull-up resistors for these inputs, meaning that a button is detected when its input is pulled LOW.

The software keeps track of which buttons are currently illuminated and compares each button press with the expected buttons.


Sound Effects

Sound is an important part of the game.

An Adafruit Audio FX Sound Board is used to store and play the sound effects.

The Arduino triggers the sound board using eight digital outputs, pins 2–9.

Different sounds are used for different events, including:

  • Starting the game

  • Countdown

  • Correct button press

  • Incorrect button press

  • Game over

  • New high score

The sound board provides the audio playback while the Arduino controls when each sound is triggered.


Audio Amplifier

The output from the Audio FX Sound Board is connected to a DY-HV20T 20W amplifier board.

The amplifier provides the power required to drive the speaker used by the game.

This gives the game much louder and more effective audio feedback than would be possible directly from the sound board.

The project files include the original DY-HV20T 20W amplifier documentation.


Arduino Mega

The main controller is an Arduino Mega 2560.

The Mega is particularly well suited to this project because it provides a large number of digital I/O pins.

The Arduino controls:

  • 10 button inputs

  • 10 button LEDs

  • Audio FX sound-board triggers

  • MAX7219 LED matrix display

  • Battery voltage measurement

The program is written in Arduino C/C++ and uses the following libraries:

  • MD_Parola

  • MD_MAX72xx

  • SPI


LED Control Electronics

The ten button LEDs require more current than the Arduino outputs should provide directly.

A separate stripboard circuit is therefore used to control the LEDs.

The stripboard design uses TIP120 Darlington transistors as electronic switches.

Each transistor controls one LED output.

The stripboard documentation shows the arrangement of the transistor drivers, resistors, Arduino connections and LED connectors.

The board is approximately:

25cm × 29cm

The stripboard therefore acts as the interface between the Arduino's low-current control outputs and the higher-current illuminated buttons.


Battery Monitoring

The Arduino also includes a battery-voltage monitoring function.

One of the buttons can be used to display the battery voltage.

The Arduino takes multiple readings from analogue input A10 and averages them to produce a more stable reading.

The program then converts this into a voltage reading and estimates the battery percentage.

The display shows the result in a format similar to:

V=12.3 70%

The software limits the displayed percentage to a range of 0–100%.


User Interface

The original user-interface design was created before the enclosure was built.

It shows the intended arrangement of the ten buttons and the large LED matrix display.

The final hardware closely follows this design.

The ten buttons are arranged around the display, with the red start button positioned prominently at the top-left of the control panel.

The coloured buttons provide an immediate visual indication of the game's active targets.


Circuit Design

The project includes a complete schematic showing the main electronic connections.

The schematic covers:

  • Arduino Mega 2560

  • Ten illuminated push buttons

  • LED driver circuitry

  • MAX7219 display modules

  • Adafruit Audio FX Sound Board

  • DY-HV20T amplifier

  • Speaker

  • Battery supply

  • Battery-voltage monitoring

  • Power connections

This makes the project considerably easier to reproduce than many of my other builds.


Software

The main Arduino program is:

reaction_v3_4.ino - (See the Download Info link at the bottom of the page)

The program controls the complete game.

The main sections of the software handle:

  • Initialisation

  • Button scanning

  • Start screen

  • Game timing

  • Random LED selection

  • Score calculation

  • Sound effects

  • Display output

  • Battery-voltage measurement

  • High-score handling

  • Kids Mode

The randomisation of the illuminated buttons means that every game is different.


Game Sequence

The basic sequence of a game is:

Start Screen

↓

Press RED START

↓

GET READY!

↓

3 – 2 – 1

↓

GO GO GO

↓

Random buttons illuminate

↓

Player presses illuminated buttons

↓

Correct = score + 1

↓

Game continues for approximately 41 seconds

↓

GAME OVER

↓

Final score displayed

↓

High score checked

↓

Return to Start Screen


Kids Mode

A slower game mode is built into the software for younger players.

Kids Mode increases the response time from the normal 0.5–3 seconds to approximately 3–6 seconds.

This gives younger players considerably more time to identify and press the correct buttons.

The mode is selected using one of the front-panel buttons.


Project Documentation

Unlike some of my older projects, this one still has a reasonable amount of technical documentation.

The surviving project files include:

  • Arduino source code

  • User-interface design

  • Main schematic

  • LED stripboard layout

  • Adafruit Audio FX Sound Board documentation

  • DY-HV20T amplifier documentation

  • MAX7219 display documentation

  • Custom font data

  • Start video

  • End video

The combination of the photographs, circuit diagrams and source code provides a fairly complete record of how the game was constructed.


Final Specification

DOWNLOAD PROJECT FILES HERE

ItemSpecification
ProjectReaction Game
Main controllerArduino Mega 2560
Buttons10 illuminated push buttons
Display8 × MAX7219 LED matrix modules
Display libraryMD_Parola / MD_MAX72xx
Sound boardAdafruit Audio FX Sound Board
AmplifierDY-HV20T 20W amplifier
Speaker1 × speaker
LED driversTIP120 transistor drivers
Button inputsArduino Mega pins 54–63
LED outputsArduino Mega pins 34–43
Sound triggersArduino Mega pins 2–9
Battery monitoringAnalogue input A10
Normal response timeApproximately 0.5–3 seconds
Kids Mode response timeApproximately 3–6 seconds
Game durationApproximately 41 seconds

 

This article was updated on December 2, 2026