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.
The game supports four clock speeds, which can be selected using the clk3 and clk1 inputs:
Setting the clock speed affects the speed of the game and the tone generator.
Check out the online simulation at https://wokwi.com/projects/352319274216569857 (including wiring diagram).
You need four buttons, four LEDs, resistors, and optionally a speaker/buzzer. 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.)