Simon Says Game

by Rayan Amir in Circuits > Arduino

251 Views, 1 Favorites, 0 Comments

Simon Says Game

1 (4).jpg

This project is inspired by and is a remake of the Simon Says handheld game but on an Arduino. This instructable presents all the necessary steps and coding to create your very own Simon Says Game.

How The Game Works:

When the game is started, it will automatically generate a random sequence of LEDs that will light up, the user must remember and input the correct order of when the LEDs lit up to win the game. In each game there are 5 rounds each adding an additional LED being lit.

If the user inputs the correct sequence, the buzzer will play a "victory tone" and the LEDs will blink rapidly. If the user loses and inputs the incorrect sequence the buzzer will play a "defeat tone" and the LEDs will blink 3 times before letting you restart the game.

This game is a great way to have fun while also testing your memory.

Now lets get into the step by step process on how to make this game.

Parts Required

parts.jpg

1x Arduino Uno

1x Breadboard

Wires

2x 330 Ohm Resistors

2x 560 Ohm Resistors

4x 10 Kilo Ohm Resistors

2x Red LEDs

1x Yellow LED

1x Green LED

4x Pushbuttons

1x Piezo Buzzer

If you do not have all of the components, you can click on the hyperlink which will send you to amazon where you can purchase the component.

Wiring

Simon Says Game (1).png
1 (3).jpg
2 (4).jpg
3 (5).jpg

Now that you have all of your supplies it is time to build your circuit. Refer to the schematic above to ensure that all of your wiring is correct.

Ground:

The LEDs and Pushbuttons and buzzer all require ground, GND is connected to both of the ground rails on the breadboard and is connected to the LEDs and Pushbuttons through resistors. The buzzer is connected to ground through a wire connected to the ground rail.

Power:

All of the components require power in this circuit, they are connected to these pins;

Push Button #1 is connected to pin 13

Greed LED is connected to pin 12

Push Button #2 is connected to pin 10

Red LED #1 is connected to pin 9

Buzzer is connected to pin 8

Pushbutton #3 is connected to pin 6

Yellow LED is connected to pin 5

Push Button #4 is connected to pin 3

Red LED #2 is connected to pin 2

When you have finished assembling your circuit, ensure that all of the wiring and component placement is the same as shown on the tinkercad unless you would like to make changes of your own meaning you will need to modify the code to fit your circuit.

Now that you have finished building your circuit you can move on to step 3.

Code

This code generates a random order of which the LED's light up, the person playing the game needs to remember the sequence and press each push button in the correct order of each shown sequence.

When the code is uploaded each led will begin to blink in order from left to right, to start the game press any of the pushbuttons. If you input the correct sequence the LEDs will blink rapidly and the buzzer will play a "winning tone". If the sequence you input was incorrect, the LEDs will blink three times then the buzzer will play a "losing tone".

Click on the file to access the code.

Video of Simon Says Game

Simon Says Game Example

Once you have finished building your circuit and uploaded the correct code, refer to this video to ensure that everything is correct and that your circuit is functioning properly.

Note: In the video there is no audio due to an issue with my phone so you will not be able to hear the buzzer play the "victory tone", but when you create the circuit you will hear it.

Have fun playing this game and testing your memory, if this is too difficult or too easy for you, you can modify the code to your liking to have the best possible experience with this game.