For quite a while I have been wanting to create a simple, yet fun game that only requires one person to play. It is extremely simple, only taking one Arduino Nano to run it. It is LED roulette. The object of the game is to stop on the green LED, avoiding the red and yellow ones. Seems easy to play and make, and it is.
First, I began by designing the device in Fusion 360. I designed the front plate to contain 9 LEDs, 6 red, 2 yellow, and 1 green. I also made a space for a tact switch to go at the bottom. I then used the my Millright CNC router to cut out the pieces that I designed.
The game mechanics go like so: A light will "move" back and forth between the two edges, and will stop whenever there is a button press. In order for it to react immediately, I used an interrupt. Each LED corresponds to an index in an array that gets cycled through. the current LED index gets its own variable as well. There is also a delay between each step, corresponding to the difficulty. On startup, the user selects the difficulty by pushing the button to reduce the delay between each change of the LED. After the correct LED is lit up, the user can double click to lock it in.
Step 3I used some sandpaper to add a nice finish and rounding to the plywood pieces. After that, I used hot glue to fasten the pieces together.
ConlusionsNow, whenever I am in the mood to play a simple game, whether for the road or just to get away from a screen, this device gives me a wonderful reprieve. I can also make it multiplayer by making each LED away from green a certain amount of points, making the person who got the least amount of points at the end wins.
Comments
Please log in or sign up to comment.