Overview
This Spring 2026 IoT class project uses an ESP32 as the main controller for a responsive smart traffic light. It combines car detection, pedestrian requests, motion sensing, night mode, audible alerts, and a live countdown display.
Featured Build
Built around a millis-based state machine with obstacle sensing, pedestrian queuing, PIR safety extension, night mode, buzzer alerts, countdown display, and a local ESP32 dashboard.
Overview
This Spring 2026 IoT class project uses an ESP32 as the main controller for a responsive smart traffic light. It combines car detection, pedestrian requests, motion sensing, night mode, audible alerts, and a live countdown display.
Challenge
The important challenge was responsiveness. A traffic controller cannot freeze inside long delays while sensors are changing, so the firmware needed to keep reading inputs while the light sequence continued.
Solution
The final sketch uses a millis-based state machine. Vehicle detection can extend green timing, pedestrian button presses are queued for the red phase, PIR motion can extend crossing time, and an LDR switches the junction into blinking-yellow night mode when it is dark and idle.
Process
The repo keeps the final ESP32 sketch, an earlier prototype, hardware logic notes, testing notes, and the submitted report so the evolution from first sketch to presentation-ready system is visible.
Stack
Outcome
The result is a working embedded-systems project with clear hardware mapping, documented behavior, and a dashboard served from the ESP32 access point for monitoring the current phase, mode, countdown, and latest event.
Key takeaway
Small embedded projects become much stronger when the control logic is non-blocking, documented, and built around real-world edge cases instead of only the ideal flow.
Repository
Shaadi619/IOT_CLASS_PROJECT