Cwh8750
Member
I've spent the last week or so combing through this forum reading the replies and advice given to previous users (since this is a frequently asked question).
Attached is my work using cascading timers to operate a traffic light. While i do have the two second delay implemented into the programming, the problem I am running into is with the delay between the lights actually becoming energized. For a moment, between the Amber North/South light de-energizing and the North/South & East/West light energizing there is a time when neither red lights are on, resulting in the simulation sending any stopped cars through the intersection resulting in a (possible) crash.
The only solution I've thought of is using an additional yet separate timer to run independently and energize both red lights milliseconds before the amber light is finished. But over time this would result in it's own problems and I'm not sure how to go about setting the timer and having it reset on it's own just after the two-second delay is finished. And i understand i could adjust the scan/s, but I would rather fix the logic behind it.
Are there any other possible solutions?
And as always, please and thank you!
Attached is my work using cascading timers to operate a traffic light. While i do have the two second delay implemented into the programming, the problem I am running into is with the delay between the lights actually becoming energized. For a moment, between the Amber North/South light de-energizing and the North/South & East/West light energizing there is a time when neither red lights are on, resulting in the simulation sending any stopped cars through the intersection resulting in a (possible) crash.
The only solution I've thought of is using an additional yet separate timer to run independently and energize both red lights milliseconds before the amber light is finished. But over time this would result in it's own problems and I'm not sure how to go about setting the timer and having it reset on it's own just after the two-second delay is finished. And i understand i could adjust the scan/s, but I would rather fix the logic behind it.
Are there any other possible solutions?
And as always, please and thank you!