Drag racing reaction timer.

Hi,

I'm new to this and just got my first programmable board a couple weeks ago. I would like to build a practice drag racing tree simulator that will display reaction time. I'd also like to use a push button to be the device that starts the tree and when you let off, it will be measuring your reaction time on the green light. Anyone have a code or suggestions that can point me in the right direction? I would greatly appreciate it.

Look into the Blink Without Delay method and Button debouncing .

chuck80:
Anyone have a code or suggestions that can point me in the right direction? I would greatly appreciate it.

Are you doing a Pro Tree or a Sportsman (a.k.a. Full) Tree? "Depending on the type of racing, all three large amber lights will flash simultaneously, followed four-tenths of a second later by the green light (called a Pro Tree), or the three bulbs will flash consecutively five-tenths of a second apart, followed five-tenths later by the green light (called a Sportsman, or full, Tree)."
There are lots of examples for lighting LEDs.
There are lots of examples for sensing when a button is pushed.
The code would do something like:
loop until the button is pressed to start the tree.
Display the amber lights.
Just before turning on the green light, check the button input.
If the button is already down, light the red light and go back to the beginning
Record the start time in microseconds by calling micros();
Turn on the green light.
Wait until the button is pressed.
Record the end time in microseconds.
subtract the start time from the end time to get the reaction time.
Display the reaction time... on whatever output device you provide. Serial to a PC is good for testing. LCD or 7-segment LED for a stand-alone solution.