Introduction: Short-Term Memorization Game

Build your own Arduino-Based Memorization Game!

In this game, one RGB LED will flash 3 random colors at the start, you will need to remember the color of each one. See where this is going? You'll use a potentiometer to change the second RGB LED and press a button to record each color from the first RGB LED. The second RGB LED will show you which color you have selected, and once you have recorded the sequence the RGB LEDs will either flash green and a sound will play from the buzzer signaling you have correctly guessed the sequence or both RGB LEDs will flash red and it will reset the sequence count back to 3* (this can be changed). You start the game off with having to remember the 3 colors shown, then if you correctly select the colors show, another random color will be added in the sequence. This will continue until you get one wrong, and like said above it will reset back to just 3 colors.

It's a really fun, addicting, and annoying game to play :)

THINGS YOU WILL NEED

  • 1 x Arduino UNO R3
  • 1 x Potentiometer
  • 1 x Push Button
  • 2 x RGB LEDS
  • 8 x 220 Ohm Resistors
  • 1 x Piezo Speaker
  • 18 x Jumper Wires (Male to Male)

OPTIONAL

1 x Shield Board


In the picture above I created a shield to show my friends at school, but it's completely unnecessary. If you'd like to go this route you'll get a soldering iron, some solder and patience. If you'd like to go this route feel free to message me and I can help you if you have any trouble.

Step 1: Adding Positive/Ground Wires to Breadboard

Very basic step

Connect the GND to the GND Rail on breadboard

Connect the 5V to the POSITIVE Rail on the breadboard

Step 2: Adding Push Button

Place the push button on the breadboard, and follow the steps in the picture above.

Connect one side to the 5V rail

Connect the 220 Ohm resistor to the adjacent side on the push button, then connect a jumper to the GND

Connect the opposing side to the 2 PIN on the Arduino

Now you've got your push button added. Make sure it looks exactly like in the picture, this is a very important part of this game!

Step 3: Adding Potentiometer

Place the potentiometer on the breadboard, and follow the steps in the picture above.

Connect one side to the 5V rail

Connect middle to the A0 Analog IN

Connect the last side to the GND

Now you've got your push button added. Make sure it looks exactly like in the picture, this is a very important part of this game!


NOTE: As long as one side has 5V and the other side is GND and the middle is going to A0, it'll work fine.

Step 4: Adding Speaker

Connect the GND side to the GND rail

Connect the + side to the 220 Ohm Resistor, then connect to PIN 7

That's it!

Step 5: Adding User Selection RGB

RGB LED's can be tricky wiring, so look at the image on the instructable to determine if you've got the correct rotation. So, my steps below will be relative to my rotation which is why it's important to follow my steps exactly!

Starting from the LEFT

Add a 220-Ohm resistor to the first two, skip the third, and add on the fouth

Connect a GND jumper to the 3rd one without a resistor, that's our GND

So with the first resistor on the left, it goes to PIN 3 (Blue)

The second resistor connects to PIN 5 (Green)

and the third resistor connects to PIN 6 (Red)

That's it! This is the RGB LED that will be used for the user to select the correct colors!

Step 6: Adding Random System RGB

RGB LED's can be tricky wiring, so look at the image on the instructable to determine if you've got the correct rotation. So, my steps below will be relative to my rotation which is why it's important to follow my steps exactly!

Starting from the LEFT


Add a 220-Ohm resistor to the first two, skip the third, and add on the fouth

Connect a GND jumper to the 3rd one without a resistor, that's our GND

So with the first resistor on the left, it goes to PIN 3 (Blue)
The second resistor connects to PIN 5 (Green)
The third resistor connects to PIN 6 (Red)

That's it! This is the RGB LED that will be used for the system to randomly select colors!

Step 7: You're Finished!

Any questions feel free to message me, I've attached the Code to this step. You shouldn't have to change anything to make it work, but feel free to tinker and make the code run smoother!

Everything SHOULD be well documented or code that explains itself, but if you're new to programming and don't understand something I respond to E-mails rather quickly!

ALSO here is the library used in the project!

https://bitbucket.org/teckel12/arduino-new-tone/wiki/Home

Pocket-Sized Contest

Participated in the
Pocket-Sized Contest