I had a problem about using pushbutton as a mode changer in the traffic light project. There are 3 modes of operation and since I used 'delay' to indicate the LED's on or off time period, pushbutton became useless during the operation of a mode. It waits until the end of mode to be changed into next mode. Is there any alternative way to use button within the mode as a mode shifter?
Look at BlinkWithoutDelay in the IDE.... File > Examples > Digital.
Also look at Nick's state machine tut.