Question: Write a program to simulate the operation of a sequential taillight system. The light systemconsists of three separate lights on each side of the car.
- Write a program to simulate the operation of a sequential taillight system. The light systemconsists of three separate lights on each side of the car. Each set of lights will be activated separately, byeither the left or right turn signal switch. There is to be a 1-s delay between the activation of each light and a 1-s period when all the lights are off. Ensure that when both switches are on, the system will notoperate. Use the least number of timers possible. The sequence of operation should be as follows:• The switch is operated.• Light 1 is illuminated.• Light 2 is illuminated 1 s later.• Light 3 is illuminated 1 s later.• Light 3 is illuminated for 1 s.• All lights are off for 1 s.• The system repeats while the switch is on.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
