Login to post a comment...
In this project, both the car and pedestrian traffic lights go through their normal cycle until the button is pressed by a pedestrian, which then causes the lights to change in favor of the pedestrian.
Connect one leg of the pushbutton to 5 volts and the other to digital pin 2 and a 10kΩ pull-down resistor. Use 220 Ohm resistors to connect the LEDs to pins 8-12.
Created on March 23, 2009, 14:37