Skip to content

Commit

Permalink
Add traffic light timings to README
Browse files Browse the repository at this point in the history
  • Loading branch information
cdonohue committed Jan 15, 2024
1 parent 1097626 commit f0643dc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ The intersection is a four-way intersection. Each part of the intersection has f

`Intersection` uses a state machine to manage the state of the intersection. The state machine is defined in `intersectionMachine.ts`.

- All lights start off red
- Northbound traffic gets a green light, including the left turn lane
- After 5 seconds, the northbound light turns yellow
- After 2 seconds, north and southbound lights turn green and turn signals flash orange
- After 5 seconds, northbound turns yellow
- After 2 seconds, northbound is red. Southbound stays green and has a protected left turn signal
- After 5 seconds, southbound turns yellow
- After 2 seconds, southbound turns red
- Repeat the above steps for east and westbound traffic (starting with eastbound)

## Coming soon

- [ ] Add sensors to detect cars waiting at the intersection. This would override the default timers and then fall back into the default timer once the sensor is no longer triggered.
Expand Down

0 comments on commit f0643dc

Please sign in to comment.