The Memory Game is a game in which four LEDs flash up in a specific order, each with a different tone, and you must repeat the sequence. When you get it right each round, the game will give you the sequence again, this time with an extra color at the end.
To begin, the player should press the start button, which will generate a random sequence (the seed that is generated by the noise/air) with a music tone, prompting the player to repeat the pattern. If it's correct, the game will add a new color/tone every time.
The player's score is kept track of, and it increases with each round. The highest score is stored in the internal EEPROM of Arduino which is never lost when the power supply is off. If the player chooses the incorrect sequence, the game ends, and the player's score is displayed; if he scores greater than the highest score, a new high score is presented on the LCD. Otherwise, the highest score will stay the same, and both the higher score and the player score will be shown. To play again press the reset button in the Arduino.
Note: the game can be upgraded to speed up the sequence speed with each round to make it more challenging.
1x Arduino Uno
5x 10K-ohm resistors
5x 220-ohm resistors
4x LEDs (yellow, red, green, and blue)
5x push buttons
1x piezo (buzzer)
1x LCD display screen (16x2)
1x 10K-ohm potentiometer
Jumper wires
Breadboard