Memory/Reaction Game

by 772911 in Circuits > Arduino

36 Views, 0 Favorites, 0 Comments

Memory/Reaction Game

reaction-game-hzd-screenshot.png

Are you looking for a game that tests more than just your ability to press a button quickly? The Memory/Reaction Game challenges players to react to different colours by pressing the matching button within a limited time. The goal is to successfully respond five times while staying focused despite an LED chaser running behind the RGB LED as a distraction. This project combines both digital and physical components, including programming code, LEDs, and integrated circuits such as the 555 timer and 4017 decade counter.

Supplies

1x 7-segment display $1.95

1x RGB LED $0.25

1x Arduino $13.93

8x Red LED $0.25 each

3x Push buttons $0.25 each

6x 1kΩ Resistors $0.25 each

2x 330Ω Resistors $0.25 each

1x 10kΩ Resistors $0.25 each

1x Potentiometer $0.95

1x 10uf Capacitor $0.75

1x 4017 johnson decade counter $1.50

2x Full sized breadboard $6.45 each

1x 555 timer IC, $1.95


Total Cost: $39.18

Research

https://www.instructables.com/Simon-Says-Game-5/ (Coding and Help with wiring the 4017 and 555)

Youtube Video (Wiring and Coding)


Before creating this project, I looked at several sources for inspiration. One of the main ideas came from a Simon Says game, where a sequence of LEDs lights up and the player must press the corresponding buttons in the correct order. I adapted this concept into a reaction based game by having only one colour appear at a time and requiring the player to respond quickly rather than memorizing a sequence. This changed the focus from memory skills to reaction speed.

I also added a seven segment display to keep track of the player's score and included a series of LEDs in the background to create distractions and increase the challenge. To make the circuit more efficient, I used a single RGB LED instead of three separate coloured LEDs, reducing both the number of components and the space required. Additionally, I used ideas from the referenced sources, including code that tracks the elapsed time since the program started, which was an important feature in making the reaction timer work properly.

Base

Screenshot 2026-06-18 143653.png

The first step of the project is setting up the main circuit on the breadboard. This includes connecting the resistors, power, and ground rails, as well as wiring the push buttons to their respective Arduino pins. To keep the circuit organized and easier to troubleshoot, all wires were colour-coded. The red LEDs were left disconnected from the main game circuit because they will later be connected to a separate 555 timer system.

When assembling the circuit, be careful not to place the LEDs in the same breadboard column as the buttons or RGB LED, as this would create unwanted electrical connections. Each push button uses a 1 kΩ resistor, while the RGB LED and the red LEDs use 330 Ω resistors to limit current. Since the RGB LED is a common cathode type, only one connection is needed for the shared cathode pin. If colour coded wires are not available, it is a good idea to label the buttons to avoid confusion about which button corresponds to each colour, both during construction and when others are playing the game.

Wiring

Screenshot 2026-06-18 144035.png
IMG_2171.png

The next stage of the project is building the LED chaser circuit using a 555 timer and a 4017 decade counter. The breadboard should be connected to the main breadboard's power and ground rails. The 555 timer is configured in astable mode, meaning it continuously switches its output between HIGH (5V) and LOW (0V). This output acts as a clock signal for the decade counter, which activates its output pins one at a time. Eight of these outputs are connected to the red LEDs, creating the appearance that the LEDs are chasing each other. A potentiometer is included in the circuit to adjust the clock speed, allowing the LEDs to move faster or slower depending on its position. Since the decade counter outputs connect to the LEDs' anodes (long legs), it is best to place this circuit close to the row of red LEDs.

The final wiring step is to connect each red LED to one of the decade counter's output pins. The LEDs can be connected in any order, although this project uses pins 1–8 from left to right. The RGB LED must also be connected to the Arduino, with all wiring clearly colour coded to make troubleshooting easier. Because the RGB LED is a common cathode device, only one current limiting resistor is required for the shared cathode connection. When physically building the wiring for the LED chaser may become crowded due to the large number of connections, so try to keep the layout as organized as possible.


Click the file to check the final schematic of the circuit.

Downloads

Rules and Code

Here is how the game works:

Pressing any button will start the countdown from 3-1 where the leds start flashing.

Press the corresponding button to whatever colour you see.

Either a wrong answer or not answering in 1 second stops the game and resets the score

5 points and you win, the game resets after.