arduino: reaction time game

I’ve been perusing a pretty good book by Michael McRoberts called “Beginning Arduino”, and after putting together one of the first projects I decided to have fun with it and write some more interesting code than the one provided. The original scheme gave a series of three LEDs that would turn on as if they were a stop light, and then allow someone to press a button to get the light to change to red so that another LED, representing the pedestrian walk sign, could turn on. This wasn’t very interesting to me, so I made it into a reaction game instead otherwise using the same circuit. See the video immediately below, and the circuit diagram (made using Fritzing) and code below the fold.

Continue reading