Question: Create a code for Arduino Uno : Want to simulate a traffic light, using 3 LED's (R,Y,G) and one momentary pushbutton to simulate a pedestrian

Create a code for Arduino Uno: Want to simulate a traffic light, using 3 LED's (R,Y,G) and one momentary pushbutton to simulate a pedestrian wanting to cross the street. Control the LED's in the typical traffic light pattern, but let RED and GREEN stay on for just 30 sec and when using YELLOW, just have it on for 3 sec. When the program starts, start In RED, and for the normal pattern automatically, BUT when a pedestrian hits the pushbutton:

a. If the button is pushed when you are RED, then make sure the pedestrian has 15 sec to walk across before turning GREEN.

b. If the button is pushed when you are GREEN, wait 5 sec and then do your YELLOW and RED.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!