Hey Head Phoned,
At the moment it is coded for just the basic purpose of display score. There is definately going to be further improvements as I complete the basic score displaying routines.
Current functions
Increase Score - Players can increase their team score by pressing their table button once. Each push will advance the score by 1.
Decreasing Score - Players can decrease their team score by having one team member pressing and holding their button, followed by the second team member pressing their button. This will reduce their score by 1.
Green Arrow - The green arrow points to the team who currently holds serve. Serve changes after every 5 points. The initial arrow direction is decided by a simple "play for serve" round. The winning team presses either of their buttons to start a game with the arrow pointing in their direction.
Game Reset - Resetting of a game can be achieved by pressing all 4 player buttons at the same time.
Five points - A five point shot can be claimed by a team member pressing and holding their button for longer than 1 second. This will display "FIVE?" on the display. A member from the other team is required to validate the 5 point claim by pressing their button. This will add 5 points to the claiming team's score.
The five point score is a rule we have at work. In each corner of the table is a 5x5cm piece of plastic glued to the table. When you hit the ball over and land it on the other sides plastic, you win 5 points in the other team does not return the ball. If they do return the ball it is only 3 points. This feature needs a lot of work.
These are the current features I am working on. Once this basic functionality is achieved I will look at further improvements. I am always open to suggestions.
Your thoughts on tracking matches has been through my head. This could be archieved via either user input, or since we use Smart Cards at work to access the buildings, I could attach an RFID reader where players could "sign in" as such.
The players records would be very nice aswell. At the moment I am going to just score the highest and lowest scoring games in EEPROM and recall this when the scoreboard is inactive. I have implemented a basic screen saver as such that scores text and this can be used to display the scores mentioned.
Further on the scores, we play to 21. When 21 is reached, the game is over. UNLESS, the scores are within 2 points. The rule is you must win by 2. If the scores are 21-20 then the game will continue until a 2 point gap is reached. This has not been implemented yet.
If you have any other ideas or questions regarding the project please feel free to ask. I am extremely interested in peoples ideas as I am not always thinking outside the square. This is my first Arduino project and my first time coding in the C language so I am doing everything via lots of google searches. I am sure my code has a lot of room for improvement.
Thanks,
Dan.