Traffic Intersection Simulation

For my Finite State Machine, I made a traffic intersection simulation. Basically it manages traffic flow at the point of intersection. I used green LED as a traffic light to signal “GO” for cars, and pressure sensor to detect traffic flow at the point of intersection.
State 1: Sensor detects cars on a lane
State 2: Other sensor check cars on the crossing lane
State 3: Gives signal
State 4: Back to State 1

*Both sensors check cars simultaneously, lane with green light has priority. Light off represents red light; blinking light represents yellow; solid green represents green. 1 second is allowed before yellow light on the crossing lane to let car pass intersection before light changes entirely.

Arduino Sketch: traffic_sim

Advertisements

2 Responses to “Traffic Intersection Simulation”

  1. how about the fsa diagram ?

  2. blabwise…

    […]Traffic Intersection Simulation « Making Things Interact Fall 09[…]…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: