Flash Recall

This project is perfect for beginners looking to sharpen their skills in programming, electronics, and game design.
The game tests your memory and reflexes by lighting up a sequence of LEDs, which you must replicate using corresponding buttons. With each correct input, the sequence grows longer, increasing the difficulty and keeping you on your toes! It's a great way to practice coding and circuit-building while creating something enjoyable for friends and family.
In this step-by-step guide with a video attached at the bottom, we’ll cover everything from assembling the hardware to wiring your Arduino. By the end, you’ll have a fully functional game to showcase your Arduino skills. Let’s get started!
Supplies
- 5 LEDs (2 green, 1 blue, 1 red, and 1 yellow)
- 4 buttons (1 green, 1 blue, 1 red, and 1 yellow)
- 5 resistors (330 Ω)
- 20 wires
- 1 Breadboard
- 1 Arduino with power cord
- 1 mounting plate
- Piece of cardboard
- 1 ruler
- Box cutter
- Markers
- Computer with access to TinkerCad and arduino.IDE
- tape
Gather Materials
Collect all materials!
Prepare Cardboard Cover


Use ruler to measure out 7" x 9" rectangle on the sheet of cardboard. Then, measure out a 5" x 7" rectangle as shown in the second picture.
Cut the Cardboard


Next, cut along the lines of the 7" x 9" rectangle and the corners of the rectangle as shown in the second image.
Making the Box


Using a pair of scissors, score along the outline of the 5" x 7" rectangle -- being careful not to cut all the way through. Then, fold along the scored edges as shown in the picture above. Then, tape adjacent edges to form your box as shown in the second image.
Make 4 Button Extenders (tops)

Cut 4 1cm x 1cm squares of cardboard. Then, color each square a different color (red, blue, green, yellow).
Make Button Extenders (bottom)

Using the leftover corner pieces from Step 3, roll and tape into tight cylinders.
Assemble Button Extenders

Adhere Button tops to cylinders using tape or hot glue.
Cut Hole for Cord

Place box over Arduino and mark where the chord extends out. Then, cut out a hole so the chord can go in and out easily.
Cut Hole for Lights


Cut holes in the box for buttons and LEDs to stick out of as shown in picture above. Be sure that all 4 LEDs and 4 buttons can stick out.
Building the Circuit (add on Buttons/lights)

Place all the buttons and lights on the board in these desired positions, making sure that the color order of the buttons matches the order of the LEDs.
Building the Circuit (add Resistors)

Add 330 Ohm resistors to the anode side of the LEDs as shown in the image.
Building the Circuit (add the Wires)

Connect all the wires for the LED's anode side and one wire for each button to the correct pin numbers (See image for LED and button pin connections).
Building the Circuit (final Connections)

Connect each button and each LED's resistor to the ground by wiring them to the negative row on the breadboard, and then connecting that row to the ground.(New wires highlighted green in the diagram for reference).
Code
Download the code attached. Upload to the Arduino IDE app on a computer. Connect the Arduino to the computer using the cable provided in the kit. Verify and upload the code to the Arduino. Enjoy your Flash Recall game!
Downloads
Game Explanation
The Flash Recall game flashes the LEDs in a random sequence. In the first round, the game will flash one LED and the player is to push the button that corresponds with the flashed LED. The player may only push the button once the lone green LED (to the right of the buttons) is on. The game will only receive player input when this LED is on. If the player pushes the correct button, the game will flash two random LEDs. The player will then push the buttons corresponding to the flashed LEDs once the green LED is on. The maximum LED sequence is 50 lights. If the player is to press the buttons incorrectly, all the LEDs will flash three times and the game will reset, beginning the sequence at just one light. Enjoy the game!
Instruction Video!
