- 1-3: Main road: 1 Green, 2 Yellow, 3 Red;
- 4-6: Side road: 4 Green, 5 Yellow, 6 Red;
- 7-8: Main Pedestrian 7 Green, 8 Red;
- 9-10: Side Pedestrian 9 Green, 10 Red)
- Main Pedestrian Button;
- Side Pedestrian Button;
- Side Road Sensor;
- Mode Switch;
-> Standard(Default) -> Rush -> Night ->
3 Operation modes have to be implemented:
- Green - Green lights up
- Green to Red - Yellow lights up
- Red - Red lights up
- Red to Green - Yellow and Red lights up
- 0 Main 3, Side 3 (1 sec)
- 1 Main 4, Side 3 (1 sec)
- 2 Main 1, Side 3 (5 sec)
- 3 Main 2, Side 3 (1 sec)
- 4 Main 3, Side 3 (1 sec)
- 5 Main 3, Side 4 (1 sec)
- 6 Main 3, Side 1 (3 sec)
- 7 Main 3, Side 2 (1 sec)
*Note: 0.25 sec tick should be the basis for checking for polling-based interrupts
RE6: During Standard mode, Pedestrian light modes depends on the mode of the road they cross (Main Pedestrian - Main Road):
- Red - RE4 modes 2, 3
- Green - RE4 modes 1, 4
For Main Road: Go to RE5 Phase 1, continue normal
For Side Road: Go to RE5 Phase 5, continue normal
RE11: During Rush mode, button press by Side Road Sensor or Side Pedestrian will loop through RE5 phases 1 time and return to RE5 phase 3.
- All road lights light up yellow
- All road lights off
- All road lights red
- RE12 1 for 1 sec.
- RE12 2 for 1 sec.
- Turn to RE12 3 for 6 seconds.
- Return to RE13 behavior.
The Software would start in this mode, then switch to regular function, as described in RE3. This is needed, as once the software is loaded onto the microcontroller, it immediately starts running.