Arduino Football

Brief Description: A laser score keeping system for a game of finger football.

Description: Using a Photo Resistor, we have created a score keeping system, using LED's to keep score by lighting up. The score that we will be keeping is that of a simple paper football game. We use a laser with the Photo Resister to make a light sensor, when the football sits on the line of the laser, the LED lights up. this creates a sort of a goal which keeps correct score by sensing the area where the football should land. This is a two person game with two separate score keeping devices, which goes up to ten.

Pictures of device:

Circut Diagram:

Arduino Program:

int potPin = 2; //Declares Pot A2 as a variable for the Photo resistorint ledPin = 13; // Declares pin 13 as a variableint val = 0; // Sets the initial value of pins to start at 0int score = 14; // Sets the score for the game to start at pin 14void setup() { pinMode (ledPin,OUTPUT); // begins the photo resistor to start reading values Serial.begin (9600); } void loop() { val = analogRead (potPin); //Sets the potPin to read the before stated value Serial.print ("Value="); Serial.println (val); if (val < 850) // If the registered value of the light is less then 850 then the score value will decrease one and light another light { score = score -1; } ledPin = score; pinMode(ledPin, OUTPUT); digitalWrite (ledPin, HIGH); { digitalWrite (ledPin, HIGH); delay (250); } delay (1500); }

Problems Encountered: We experienced problems when it came to timing and figuring out how long each light should stay on. A few set backs were some errors in code and some mix ups in wiring. On the last day of class, one of the boards was not working at all, even though it had been working all week. After adjusting some wires and our code a few times we completed the project with pleasing results.

Time/Money: Since we did not start this project till late in the semester, we were obviously tight on time, making it difficult to get the results that we desired. Near the end of our project, we began to come up with other ideas pertaining to the outcome of this project. We realized that with more time, we could be able to make a fully functional arcade game. Similar to a game like air hockey, our football game would use servo motors to push the football like a puck or even launch it to the other side, of course this would take some more programming and a stronger motor. We also thought about adding noises to the project, so not only would the LED's light up when you score, but the board would also make a sound like a sports buzzer.