A state machine written in C that simulates a four-way traffic intersection with real-time features.
C C++
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Source Files



Description: A state machine written in C for a FreeScale HCS08 microcontroller to simulate all of the features relevant to a four-way traffic intersection.

Functionality of the program includes:

-> Normal red, green and yellow sequences
-> Priority pedestrian walk signal button
-> Ability to configure the light sequence via the SCI Serial Port to vary green light duration
-> Traffic counters for each direction (saved for future diagnostics)
-> Temperature sensors for icy road conditions that increase yellow light duration upon detection
-> Left turn sensors for prioritization during peak rush hours

System Schematic:

Traffic Light System Schematic