Simon says is a simple electronic memory game: the user has to repeat a growing sequence of colors. The sequence is displayed by lighting up the LEDs. Each color also has a corresponding tone.
In each turn, the game will play the sequence, and then wait for the user to repeat the sequence by pressing the buttons according to the color sequence. If the user repeated the sequence correctly, the game will play a “leveling-up” sound, add a new color at the end of the sequence, and move to the next turn.
The game continues until the user has made a mistake. Then a game over sound is played, and the game restarts.
Check out the online simulation at https://wokwi.com/projects/371755521090136065 (including wiring diagram).
You need four buttons, four LEDs, resistors, and optionally a speaker/buzzer and a two digit 7-segment display for the score.
Ideally, you want to use 4 different colors for the buttons/LEDs (red, green, blue, yellow).
btn4, and also connect each button to a pull down resistor.
led4, matching the colors of the buttons (so
btn1have the same color, etc.)
sev_gto individual segments,
digto the common pin of the first digit,
dig2to the common pin of the second digit.
seginvaccording to the type of 7 segment display you have: high for common anode, low for common cathode.
Note: the game requires 50KHz clock input.