Question: This task will complete the traffic light system you began in part 1 of this project and will incorporate a pedestrian crossing button / switch

This task will complete the traffic light system you began in part 1 of this project and will
incorporate a pedestrian crossing button/switch into the system (rather than the system
automatically transitioning) and will include a Stateflow Chart block in the model.
A Stateflow Chart is a block in Simulink that allows us to implement finite state-machines
(FSMs) which are systems that can be described as a
set of states that transition depending on certain
conditions being met. Traffic lights are ideal
examples of FSMs; we can consider this system as
being made up of Three (3) states;
1) cars go (green light) and pedestrians stop (red
light),
2) cars given caution signal (yellow light) and
pedestrians stop (red light), and
3) Cars stop (red light) and pedestrians go (green light).
Part A
Modify the basic structure of the traffic light system you built for part 1 of this project to
simulate (use Dashboard components) a FSM version of this system that behaves as follows:
- The system must still consist of Three (3) traffic lights (red,
yellow and green) and Two (2) pedestrian lights (red and green).
- The system must also have a pedestrian button (a Dashboard
push button) that detects when a person wants to cross the road.
- The FSM must be defined as having Three (3) states only.
- State 1 allows the traffic to go (the green traffic and red
pedestrian lights will both be on, all other lights will be off) and
this state will remain active until the pedestrian button is pushed.
- After the pedestrian button is pushed, the system will transition
to state 2 where the traffic is cautioned for Three (3) seconds (the yellow/amber traffic
and red pedestrian lights will both be on, all other lights will be off).
- Finally, state 3 allows the pedestrian to cross the road for Six (6) seconds (the red
traffic and green pedestrian lights will be on, all other lights will be off).
- The system must then reset back to state 1 and repeat this process.
For your design methodology, ensure you use an algorithmic state diagram and state
transition table to show how the system should work.
Part B
Once youre happy your simulation is working, and youve troubleshot anything that needs
fixing, replace the simulation blocks (Lamps and Pushbutton) with the appropriate Arduino
inputs/outputs and deploy this system to the Arduino Uno hardware. The system should
behave the same as before, but red, green, and yellow LEDs should light up instead of the
simulated lamps, and youll use a momentary switch on your breadboard to act as the
pedestrian button.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!