Simon Says Memory Game V2
This is my Final Exam project, I have decided to make an Arduino memory game.
The goal of the game is simple, the Leds displays a sequence of lights and sounds, and the player must repeat the pattern by pressing the correct buttons. As the game continues, the sequence gets longer and more difficult, testing the player’s memory and reaction time as there is a penalty of you fail to do it in time. Every time you complete 2 sequences correctly you will help build a face on the Arduino, so in order to win you must get the sequence correct 6 times.
When you have completed this project get ready to play! the led's light up in random sequence to make it more fun, adjust the code to challenge yourself !!
Link to video showcase of this project, shows ideal animation, victory, losing animation, sequence correct animation, time limit. CLICK ME
Credits
https://www.instructables.com/Arduino-Simple-Simon-Says-Game/ - this is the original circuit, I took inspiration from it and it also helped me with building my own code for my memory game. Make sure to check them out.
https://projecthub.arduino.cc/Jerepondumie/make-an-arduino-memory-game-c9c093 - this site helped me with building my code
Supplies
Materials
Wires ( any colour but + - is preferred to be red and black)
tools
Device to code on/put code onto arduino
(you can search up the parts to buy them but I have listed some generic ones all materials should have a clickable link embed to guide you.
Put Leds,buttons, Buzzer and 7 Segment on Breadboard
Start by gathering your Leds, Buttons, buzzer and 7 segment display
Go ahead and place your buttons in, then place led next to that button but the legs of the button and led shouldn't be in the same row. Repeat this until all 5 buttons and leds are placed
Go ahead and add the buzzer next to the Led, then place your 7 segment display next to the buzzer, it should look something like these images.
Connect Resistors to Buttons and Led's
Now we must connect these buttons to ground so go ahead and take 5x 10k resistors and put one of them in the same row as the buttons (right part of the button) as shown in images. Repeat until all buttons are connected to ground.
Now go ahead and take 5x 330 resistors and attach them to the leds, (make sure it's connected to the negative/cathode part of the Led or else the circuit will not function. Repeat until all leds are connected to ground. should look similar to images
Rail Buttons and Buzzer and 7 Segment Display
Now we must provide power to all these buttons and provide ground for the buzzer and also providing power for 7 segment display. Go ahead and take some red wire (or any colour if you do not have that) and connect them to the left part of the button (should look like photo provided)
Now go ahead and take some black wire (or any colour if you do not have that) and connect the buzzer to negative rail (same side as the buttons, should look like photo provided) make sure you are connecting the side without the + icon on the buzzer or else it will not function
Now Take 1x 1k resistor and connect the middle min of the 7 segment to the positive rail, and take 1x 10k resistor and connect it to the negative rail on the same side as the resistors (should look like photo provided)
Finally To finish this circuit off connect both sides of power rails together, positive to positive and negative to negative, should look like image provided.
Connect Led,button,buzzer,7 Segment to Arduino
Now that you have wired it, you must connect each led and button to an Arduino pin.
It does not matter which pins you connect which too but if you order the pins differently you can adjust it in the code
These are the Arduino pins that correspond with the one I made (code follows this but can be adjusted if you want)
int led1 = 2;
int led2 = 3;
int led3 = 4;
int led4 = 8;
int led5 = 13;
int btn1 = 5;
int btn2 = 6;
int btn3 = 7;
int btn4 = 12;
int btn5 = 11;
int buzzer = 9;
int segF = A4;
int segB = A5;
int segD = A3;
These are all the pins each led and button are connected too, follow the image provided for reference
Finally to finish the build off you must take 2 strips of wire (preferably red and black) and connect positive rail to 5v on Arduino and negative raid to ground on Arduino. It should look something like the image provided
Build the Code
Download/open this file, it contains the Simon Says memory game code
Downloads
Upload Code to Circuit
Go ahead and plug in the blue cable for the Arduino into your laptop/device and then upload the code, click the second button in the left corner the arrow pointing to the right -> and make sure to select the Arduino board or else the code wont upload to anything.
Completed
You have completed building this project, I am relatively new to this so if you have any feedback please provide and feel free to modify it and make it unique in your own way!
Have Fun :P
PS. make sure to check out the original link, their instructable is linked above