Formula 1 Light Reaction Game
by stuisart4 in Circuits > Electronics
136 Views, 1 Favorites, 0 Comments
Formula 1 Light Reaction Game

I am a serious fan of Formula 1 racing. I am fascinated by the speed of the cars, but also the speed of the driver's reflexes when they start the race. So I decided to make a game out of the starting lights of a Formula 1 race. I made a light reaction game to test my reflexes and to compete against my friends. This game can be played by one person or two players.
The game mimics the Formula 1 start as much as possible, with the lights and also sounds from the included buzzer. All that is missing is a checkered flag. This game is great for all ages, kids and adults alike. I really hope you enjoy building and playing with this project, and testing your reflexes. Do you think you can beat my best time of 0.17s?
Supplies
.jpg)


Circuit Hardware:
All of the hardware and materials I used are linked below.
1x Arduino UNO R3 (I used the version from Elegoo, linked here)
5x Red LEDs
2x Buttons
1x 3 pin 10k potentiometer (I can't find the one I used online, but here is a great substitute)
1x 9V Battery
1x Phase Dock Workbench (Recommended)
2x 2x3 Click Connector (Recommended) (Included in the Workbench)
1x 1x2 Click Connector (Recommended) (Included in the Workbench)
1x Breadboard mounting plate (Recommended)
Lights


We will first start off with the LEDs. They are used to tell the user when to press the button. They will turn on one at a time, and then turn off all at once.
- Place the 5 Red LEDs in parallel with each other, leaving a one to two pin gap in between each LED for spacing reasons
- Connect a 220 ohm resistor in series to each LED.
- Make sure the LEDs are connected to ground.
- Connect the LEDs to digital pins 2-6 on the Arduino as shown here.
Buttons


The next step is to add the buttons. They are essential for user input. I like the bigger buttons linked above because they are easy to use and see. I can customize the color of the buttons, too! If you have smaller buttons, they will work fine here as well.
- Place the buttons on either side of the LEDs as shown in the picture.
- Connect the left button to pin A1 (digital pin 15)
- Connect the right button to pin A0 (digital pin 14).
- Connect the other end of the button to ground.
LCD Screen


The LCD screen is used to communicate with the user. It is used to show the reaction time, which button was pressed, tells the user how the game is played, and asks how many people are playing.
- Place the LCD Screen on the smaller breadboard.
- Connect the middle pin of the potentiometer to pin 3 on the display.
- Connect the other ends of the potentiometer to power and ground, respectively.
- The potentiometer controls the brightness of the display, but once it is set, you will not have to mess with it every time you play the game.
- We will be using pins 7-12 on the Arduino to connect to pins 4, 6, 11-14 on the screen.
- Follow the schematic shown to wire correctly.
Buzzer


The buzzer makes the game more dynamic and adds sounds that play when each of the lights turns on. This sound is very similar to the sound made during an actual F1 race. Linked here is a video of the light sequence.
- Use pin 13 on the Arduino to connect to the positive end of the buzzer.
- Connect the other end of the buzzer to ground.
- Make sure you connect your ground and power connections to the GND and +5V pins on the Arduino, respectively.
Code
Upload the following code to your Arduino via the Arduino IDE
- Download the .ino file below
- Open the Arduino IDE
- Click "File" > "Open"
- Click the file titled "F1LightGame.ino"
- Plug in your Arduino
- Upload the code to the Arduino
Downloads
Phase Dock Workbench (Recommended)

If you are using the Phase Dock Workbench system to organize your circuit, the following materials will be required.
The large breadboard with the LEDs and the buttons should be at the bottom of the workbench. Use the large breadboard mount to stick the breadboard to the mount, and attach using the small holes on the workbench.
Next to that, place the screen above the lights. Use a 2x3 click connector and stick the breadboard to the top of the platform.
Next, using the 2x3 click connector and the Arduino mounting slide, attach the Arduino to the slide, and connect the slide to the click connector. The Arduino should be beside the screen and above the LEDs.
Finally, use the 1x2 click connector and attach the battery to it. Place this next to the Arduino, in the corner of the workbench
I liked using the workbench system because it makes this project easy to organize all of the hardware, and also makes it portable, so I can travel with it hassle-free.
Play



It's lights out and away we go! It's time to finally play the game! To see an example of people playing, see the video below.
To start the game, first connect the battery to the Arduino. This will illuminate the screen, asking if one player or two players are playing, pointing to the corresponding button. Once a button is pressed, the screen tells the player/s how the game is played, and after 5 seconds, the lights will start to turn on one at a time. Once all the lights are on, a random amount of time passes before they all turn off at the same time. When the lights turn off, the player/s then press the button, and their reaction time is shown to them, along with an arrow pointing to which button was pressed. If you are playing by yourself, only the left button will work. Once the time is shown, the game will reset, and you can choose if you are playing alone or with a friend.
I hope you enjoyed building this project, and have fun playing with it!