*Students will build a Traffic Light (Task #3).
Task #3 – Terry Traffic Tamer
Mission:
Your mission is to install a traffic light control system that will enable you to keep traffic moving smoothly. From your traffic control center, you see on a video monitor that an ambulance is coming. Install a limitSwitch to reset the light program so that you can adjust the time for the red light to stay on while the limitSwitch is pressed to get the emergency vehicle safely through the intersection.
Save As:
Last name Traffic Light
The light sequence:
1. Start with the redLED on and the greenLED and the yellowLED should be off.
2. Make this program a continuous loop. while(1==1)
3. Have the redLED on for 2 seconds.
4. Turn turn the greenLED on for 2 seconds.
5. Then the yellow on for 1 second.
6. Only 1 light should be on at a time.
Motor And Sensor Setup:
Digital 6: Limit Switch
Digital 7: Green LED
Digital 8: Yellow LED
Digital 9: Red LED