Flash Recall

by rebekahjlee02 in Circuits > Arduino

576 Views, 3 Favorites, 0 Comments

Flash Recall

IMG_5300.JPG

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

  1. 5 LEDs (2 green, 1 blue, 1 red, and 1 yellow)
  2. 4 buttons (1 green, 1 blue, 1 red, and 1 yellow)
  3. 5 resistors (330 Ω) 
  4. 20 wires 
  5. 1 Breadboard  
  6. 1 Arduino with power cord
  7. 1 mounting plate 
  8. Piece of cardboard
  9. 1 ruler
  10. Box cutter 
  11. Markers
  12. Computer with access to TinkerCad and arduino.IDE 
  13. tape 

Gather Materials

Collect all materials!

Prepare Cardboard Cover

IMG_6794 2.jpeg
IMG_6796.jpeg

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

IMG_6797.jpeg
IMG_6798.jpeg

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

IMG_6799.jpeg
IMG_6851.jpeg

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)

IMG_6801.jpeg

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

Make Button Extenders (bottom)

IMG_6800.jpeg

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

Assemble Button Extenders

IMG_6803.jpeg

Adhere Button tops to cylinders using tape or hot glue.

Cut Hole for Cord

IMG_6852.jpeg

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

IMG_6859.jpeg
IMG_6907.jpeg

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)

image.png

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)

resistors.png

Add 330 Ohm resistors to the anode side of the LEDs as shown in the image.

Building the Circuit (add the Wires)

wired.png

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)

final circuit.png

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!

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!

Flash Recall Instructions