I am asking for help to make state machine for traffic light system with pedestrian crossing . It is facts that traffic rules are not strictly followed in my country India. The fixed time traffic light system controller works for the vehicle in the city I live in. If you are driving car and you get green signal then you can go towards east north and south direction. One direction is active for one minute and on three directions the driver has to wait for one minute.
When the signal is green, the countdown timer starts at 60 seconds, so the driver can go in three directions. The yellow light turns on when the timer reaches 10 seconds. The red light turns on when the timer reaches 0 seconds. Driver has to stop when he sees a red light. It is a busy traffic system with long stops. In some places, automatic as well as manual traffic light system is operated.
I would like to design state machine for UK/US based traffic light system with six LED's and two push buttons. I presume the traffic light for vehicles on the main road has three possible states- Red, Yellow and Green while the traffic lights for pedestrians to cross the road have two lights- red for Wait (W) and green for ( G ).
I am having trouble to setting timing for vehicle and pedestrian crossing.
Obviously goal is not to create a real world system for traffic controller. I just want to learn state machine so that's the only reason using example traffic light system with pedestrian crossing system
When the signal is green, the countdown timer starts at 60 seconds, so the driver can go in three directions. The yellow light turns on when the timer reaches 10 seconds. The red light turns on when the timer reaches 0 seconds. Driver has to stop when he sees a red light. It is a busy traffic system with long stops. In some places, automatic as well as manual traffic light system is operated.
I would like to design state machine for UK/US based traffic light system with six LED's and two push buttons. I presume the traffic light for vehicles on the main road has three possible states- Red, Yellow and Green while the traffic lights for pedestrians to cross the road have two lights- red for Wait (W) and green for ( G ).
I am having trouble to setting timing for vehicle and pedestrian crossing.
Obviously goal is not to create a real world system for traffic controller. I just want to learn state machine so that's the only reason using example traffic light system with pedestrian crossing system
Last edited by a moderator: