Question: Using C programming- Write a program for Arduino that controls a set of two traffic lights at a crossroads. Assume that when the east-to-west traffic
Using C programming-
Write a program for Arduino that controls a set of two traffic lights at a crossroads. Assume that when the east-to-west traffic lights are green or amber, the north-to-south traffic lights are red. Green lights must stay on for 2 minutes and the amber lights for 6 seconds (remembering that in all other cases the light must be set to red). You can assume that the Arduino is wired to the traffic lights in the following pin configuration.
East-west traffic light ? Green light -> Pin 0; Amber light -> Pin 1; Red light -> Pin 2
North-south traffic light ? Green light -> Pin 3; Amber light -> Pin 4; Red light -> Pin 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
