Program a two-way intersection.
Two stoplight boards control traffic and pedestrian crossings. Connect them to the ERC2 controller, write the control program in C/C++, and test how the signals change over time.

Hardware Bench
Power off
In TestGUI, arrow keys choose a diagnostic; Enter or Space opens it. Escape returns from a diagnostic. In student code, Enter or Space taps the screen center.
Stoplight pinout
Both stoplights, as shown on the bench.
Button is the pedestrian switch, SW1.
NC has no electrical connection.
ERC2 controller
Screen controls and connections.
- LCD
- Touch the screen to interact. In TestGUI, use Tab to focus the screen, arrow keys to choose, and Enter to open.
- Flex I/O
-
Bank 1Pins 0–7
Bank 2Pins 8–15
Each column has a signal, +5V, and ground socket.
USB-B indicates an upload. USB-C, CHG, Servo, Motor, I²C, and the battery are shown for reference only.
Board keys: 1 Select · 2 Jumper wire · 3 Remove · Delete removes a wire · Esc cancels.

