Smart Traffic Light System

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.

CategoryIoT / Embedded Systems
Year2026
RoleIoT firmware builder / class project team member

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.

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.

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.

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.

ESP32C++Arduino IDESensorsState MachinesWeb Dashboard

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.

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.

Shaadi619/IOT_CLASS_PROJECT

Open GitHub repo