Simon Says

by Stoogle in Circuits > Arduino

2320 Views, 4 Favorites, 0 Comments

Simon Says

1.png

This Instrucable will show you how to get a simon says game up and running using an Arduino Uno board and a couple of other materials.

Things You Will Need

1.png

  • 8 resistors
  • 4 buttons
  • 4 LEDs
  • LCD 1602 module with pin header
  • 1 Arduino Uno board
  • 1 bread board
  • 25 jumper wires

Connect Your LEDs

1.png

I extended the cathode and anode in this diagram to better diagram how to wire the LEDs. You essentially want a space in between your cathode and anode and in empty space, we will put a 220 resistor connecting that space to the anode in the space next to it. Then you want to ground the cathode. Repeat this step with your other LEDs leaving about 4 spaces in between each LED

Connecting the Buttons

1.png

This is why we left a space in between the cathode and anode of the LEDs. We are going to slot a button in between the cathode and anode of each LED with half the button on the rail in the space between the cathode and anode. Then we connect a 220 resistor from the button to the ground and a wire from the pin on the same side to the hot rail. Now we connect a wire from the pin that is in between the LED and connect that to slot 2 on the Arduino Uno board. The reason behind this complicated setup is so we can swap between input and output using the same port and without burning out our LEDs. Refer to the picture if you are confused. Repeat this with the other 3 buttons using slots 3-5 on the Arduino board.

Connect the Potentiometer

1.png

The potentiometer is used to control the display of the LCD screen. You will need to connect the north pin to the cold rail and the south pin to the hot rail matching the diagram. Don't worry about the middle pin for now. We will connect it in the next step.

The LCD Screen

1.png

And now we have come to the LCD screen. This screen will show the user his/her score as well as notify the user of important information. Such as correct/incorrect answers, prompts and anything else. Just slap the LCD screen on an empty spot on the bread board and connect the wires according to this list. The very far left (or in this picture, the furthest south) will be labeled as number 1.

  1. connect to the ground rail
  2. connect to the hot rail
  3. connect to slot 12
  4. connect to slot 11
  5. connect to slot 10
  6. connect to slot 9
  7. do not connect
  8. do not connect
  9. do not connect
  10. do not connect
  11. connect to slot 8
  12. connect to the ground rail
  13. connect to slot 7
  14. connect to potentiometer
  15. connect to the hot rail
  16. connect to ground rail

Connect the Rails

1.png

Lastly, we want to make sure that both hot and cold rails are connected to each other and then connected to the ground rail and 5v on the Arduino board.

The Code

All that's left to do is to upload the code provided and run it on your Arduino. Hope you enjoyed.

Downloads