LIGHTSWITCHERS
This is my entry for If This Then That.
Lightswitchers is a 1v1 pvp game where you try to pull the light towards your side by spamming your button as fast as possible.
Supplies
Materials:
1x Arduino Uno R3
2x Button
3x Green LED
4x Red LED
7x 220O Resistor
2x 10kO Resistor
Tools:
Weld Machine
Wood Glue
Conceptualization
Early on the project i wasn't sure what to make but as I talked to schoolmates I started to like the idea of a competitive game where you battle another human. As I didn't want to make the most complex game, this seemed like a good compromise for my current skill in Arduino and the idea I wanted to indulge myself in.
Circuit Setup
The circuit can end up quite disorganized so it could be advised to tape all the LED wires together. All LEDs have a 220O resistor and the buttons have a 10kO resistor.
Code
The code makes sure the game always starts at light 4. When a button is pressed, a row of IF statements initiate to check where the current light is, if the if statements sees a light is on, it will turn it off and turn on the light adjacent to it on the button's side. When the light reaches the last green LED. it flashes between the green LED it got to, and the center one, showing the winner.
Downloads
Cutting
This is the Illustrator file for laser cutting if you'd want to do that. All sides have to be glued except for the top part, which is the lid. Make sure to use tape or something alike to keep the LEDs in place in the holes. The button's will sit loosely, but this is fixable with an extra wooden beam or some tape. It's not a big issue however, as the buttons won't get out of the holes to push them.
Downloads
Contemplation
This project has been rough for me, and though i won't be doing any more Arduino stuff in the coming years. I think it has helped me gain an understanding for they way products are made and small machinery works (like toys). Making the box was also very satisfying. If i ever need to make some hardware, at least I understand it's basic principles. I also have a fun game to play with anyone around.