First, please forgive me. I’m VERY new to this.
I’m trying to write a code for a “Control Point” device for my son’s paintball games. I’ve tried my best to figure it out, but I’m at a loss.
here’s the basic rundown of the device.
-20x4 lcd display
-two buttons for control (one for yellow team and one for green team)
-three led’s for indicator lights (one for yellow, one for green and a blue one for neutral) the led’s will be light up according to the respective team that holds the control point
there are two teams (yellow and green) and a “neutral” (blue)
the main screen should read as follows
(0,0): “CONTROL POINT”
(0,2): “YELLOW: (THEIR SCORE)”
(0,3): “GREEN: (THEIR SCORE)”
a score will clock in relation to time for both the yellow team or the green team (which ever team holds the “control point” (but the score wont disappear for the one team when the other captures it). one point for one full minute held.
when held by “neutral” no clocking occurs for either team (or neutral)
when a team goes to capture the control point, they must hold the button for 5 seconds to take the control point to “neutral”, then hold it for another 5 seconds to take it to their control (either yellow or green).
when taking the control point, a separate display comes up on the same lcd that says “Neutralizing” during the fist 5 seconds, then “capturing” during the next 5 seconds with a progressive status bar underneath it.
if at any point the button is released during “neutralizing” or “capturing” then the control point stays in the last completed phase (either not neutralized and stays in oppositions control, or not captured and stays neutralized)
after the device has been in one teams control for, say, 30 minutes, it automatically goes back to neutral, causing them to have to recapture the control point, but just adding to the score, not starting it over.
here is something I tried to use (put together from a few different sources), I just don’t have the understanding yet to figure it out and its coming down to the wire for when my son needs this. Any help is appreciated, and like I said at the top, I.m willing to throw you some money (Paypal).
Control_Points.ino (12.2 KB)