I found a open source code on here I've been playing around with and try to use, but it doesn't seem to be working.
The function of it is: one team presses a button to control the location, and a stopwatch logs the amount of time the point is controlled, until the other team comes and presses their button. The the clock stops for the fist team (and displays the value) and begins for the second team...and so on and so forth.
I have the circuit built and programmed, but when I press the green button to begin...nothing happens.
Any help would be much appreciated...and I can paypal a few bucks to help with your time. Thanks in advance.
Your descriptions sounds like you want an inverted chess clock".
A chess clock works like that:
If it's turn for "white" to do a move, the white time is counting.
When the white player has done his move, he presses a button, the white time stops and the black time is counting.
If the time for one player reaches a fixed amount of time and the game is not yet ended, the game is over and the player who ran out of time loses the game, while the player with time left on his clock is the winner.
What you described is somewhat similar to a chess clock, except there is no "final time" and you don't have just two players (white and black) but you have three players (yellow,green,blue) and the time is not running against the opponents (who did not push their button), but time is running pro the player who pushed his buttons.
How are the buttons connected?
As you are using pinMode INPUT I'm assuming your button circuits contain pull-down resistors? Or not?
How long are the wires from Arduino to the buttons? Is it more than 60cm (0.6m or 2 feet) wire length from Arduino to button(s)?