Having problems with code and programming buttons

  1. When button 2 is pressed then toggle a test blink mode flag, reset the state to 0, and record the current millis()
  2. If you are in test blink mode then check to see if 1000ms have passed by reading millis() and comparing to the time you stored in step 1
  3. If 1000ms have passed then alternate which set of traffic lights are on and record the current millis() again

The following tutorials may help:

Example-code for timing based on millis()

BlinkWithoutDelay