Reation Time Game

by 792935 in Circuits > Arduino

252 Views, 0 Favorites, 0 Comments

Reation Time Game

Screenshot 2023-06-19 140316.png

The project's main controls that the player interacts with are pressing the 3 push buttons to play. The goal is to press the button that corresponds to the turned-on yellow LED as fast as you can. The green LEDs indicate the next yellow LED. When the song finishes, your score will appear on the red LED. If the LED is blinking then that means you win the game and if it does not blink that means you failed. Make sure to press the buttons enough for the input to be accepted. This project is meant for those who have some experience with being able to cut wires and basic circuit knowledge.


In this instructable you will find the following:


Code

Materials list

Schematic

TinkerCad

Supplies

Screenshot 2023-06-19 140316.png

sid 2023-06-19 141213.png
sid1 2023-06-19 141254.png

Although the project might look scary and really complicated in this step-by-step instructable you will have this project looking better than mine! For this project, you will also be required to download the Arduino software. The link to the software can be found HERE.

Tinkercad and CODE

sid 3 2023-06-19 141417.png

For this project, you will also need to be able to plug your Arduino into the computer. Once you have plugged the Arduino into the computer and opened the software go to tools on the top right and select ports. Make sure that your Arduino UNO is showing on the port. After you have done so you can copy and paste the code that is provided with the TinkerCad. Next, click the arrow in the top left and save your work. The code starts by defining all the pins into variables and what type of pin it is (digital or analog). the song is put into an array as a set of 3, which is the tone delay and pitch. When the game starts each tone is only played if the button that corresponds to the yellow LED is pressed. If this is true then the buzzer will play the tone. If the wrong button gets pressed then the 555 Timer is activated by giving it power. The 555 timer has no coded parts and is used to blink the LED. If the correct button is pressed then the 555 timer will not get any power meaning the LED will not blink or turn on. If the wrong button is pressed then the penalty will be added to the score. If the player completes the song they will get the LED to blink at the end.


sid 4 2023-06-19 141507.png

Now it's time for the wiring! All that's left is putting the components and wires in their spot. The diagram above shows you exactly where each wire and component should go. While wiring makes sure to look at every detail and try to make the wiring as neat as possible. If you encounter any errors or if something is not working make sure to see if the wire is in the correct spot. If you want to test the diagram for yourself you can see the TinkerCad in the code section. The components that have no code are the 555 Timer. A 555 timer adds a delay between the voltage getting to the red LED. This creates a blinking effect. Have fun with your game and show it to all your friends!


VIDEO Demo

This the demo you can how this circuit. I hope This Tutorial!!!!.