Reaction Game

I always wanted to build a game from scratch using an Arduino and combine this with my woodworking skills. When Agata was 1 year old, I used this as a pretext (so she can play) and built a wooden box where I could mount 4 buttons, added an LCD and there you go, the foundations for any game with 4 coloured buttons and a display.

Wood template

My project was a reaction game. Press a button to start the game, then a random coloured button will light up and you need to press it in a given time. On the LCD there’s a progress bar showing how much time you have. The game starts with a time limit of 2.5 seconds to press the button, then with each press, time decreases with 50 ms until it reaches 750ms / interval and then keep it at 750ms as anything below that is too fast to react to. My top score is 48 presses :-)

Parts I used for this projects:

The electric circuit is very simple, just connected the buttons to 4x GPIO, the LCD and the power supply.
To avoid battery drain, I added a switch between the battery and the arduino VIN.

Wood template

The source code for the game can be accessed here: https://github.com/marianperca/reaction-game