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:
clk3 | clk1 | Clock Speed |
---|---|---|
0 | 0 | 4KHz |
0 | 1 | 6KHz |
1 | 0 | 12KHz |
1 | 1 | 14KHz |
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).
btn1
, btn2
, btn3
, and btn4
, and also
connect each button to a pull down resistor.led1
, led2
, led3
, and led4
, matching
the colors of the buttons (so led1
and btn1
have the same color, etc.)speaker
pin.clk3
and clk1
inputs).Four push buttons (with pull-down resistors), four LEDs, and optionally a speaker/buzzer
# | Input | Output |
---|---|---|
0 | clock | led1 |
1 | reset | led2 |
2 | btn1 | led3 |
3 | btn2 | led4 |
4 | btn3 | speaker |
5 | btn4 | |
6 | clk1 | |
7 | clk3 |