Simon Says Game

by Hadi_jass in Circuits > Arduino

2671 Views, 2 Favorites, 0 Comments

Simon Says Game

Screen Shot 2020-06-19 at 5.54.49 PM.png

Welcome to my Simon says game!!

This intractable will walk you through to create a Simon says game on tinkercad

Materials

Screen Shot 2020-06-19 at 5.55.34 PM.png

you will need the following equipment in tinker-cad:

4 push buttons

4 any colour LEDs

1 Piezo

1 Potentiometer

4 360 ohms resistors

4 1k ohms resistors

Set Up Buttons

Screen Shot 2020-06-19 at 5.57.54 PM.png

Start by placing the buttons along the middle of the breadboard. Add 2 wires to the breadboard so there is a ground and a rail with 5V as shown in the image.

Add Resistors

Screen Shot 2020-06-19 at 6.00.15 PM.png

Add the 4 1k ohm resistors to the breadboard and connect them to ground. Add power to the buttons as shown in the image above

Add Piezo and Potentiometer

Screen Shot 2020-06-19 at 6.01.15 PM.png

Add the piezo and connect it to the potentiometer as shown in the image. This will allow the use of buzzer noises later in the game. I will flip the piezo in the next slide so do not panic if it looks a little bit different.

Add LEDs

Screen Shot 2020-06-19 at 6.03.04 PM.png

Add the 4 LEDs and make sure each LED is right beside a button so its easy for the user to understand which button activates each LED. Add each 360 to connect to the cathode of each LED and connect to ground.

Add Wires to LEDs

Screen Shot 2020-06-19 at 6.09.35 PM.png

Add wires to connect each LED to the Arduino so it can turn on in the game.

Connect Wires to Buttons

Screen Shot 2020-06-19 at 6.13.20 PM.png

Now connect 4 pins to each button as shown in the image. The orange wires is the wire that connects to the buttons. This pin will be used in the future.

Code Part 1

Screen Shot 2020-06-19 at 6.13.43 PM.png

The image shows the code required to run the game on the Arduino. Read the comments in the image to gain a better understanding of what each line does. Remember that my pins may be different then your setup so change that part of the code accordingly.

Code Part 2

Screen Shot 2020-06-19 at 6.14.04 PM.png

The image shows the code required to run the game on the Arduino. Read the comments in the image to gain a better understanding of what each line does.

Code Part 3

Screen Shot 2020-06-19 at 6.14.24 PM.png

The image shows the code required to run the game on the Arduino. Read the comments in the image to gain a better understanding of what each line does.

Code Part 4

Screen Shot 2020-06-19 at 6.14.55 PM.png

The image shows the code required to run the game on the Arduino. Read the comments in the image to gain a better understanding of what each line does.

Code Part 5

Screen Shot 2020-06-19 at 6.15.09 PM.png

The image shows the code required to run the game on the Arduino. Read the comments in the image to gain a better understanding of what each line does.

Code Step 6

Screen Shot 2020-06-19 at 6.15.30 PM.png

The image shows the code required to run the game on the Arduino. Read the comments in the image to gain a better understanding of what each line does. This is the last slide for the project and now when you run the program should run.

I hope you enjoyed it! :)