{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW6aFSM - HW 7 CS 30 Due Friday June 4th 4:45pm in the HW...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
HW 7 CS 30 Due Friday, June 4th, 4:45pm in the HW box 1. Draw the finite state diagram, but do not draw the truth table or determine the logic, for the following traffic light: The traffic light has four sensors, two for cars and two for pedestrians. Sensors: NSCar, EWCar, NSPed, EWPed. The clock is 15 seconds Yellow is 15 seconds Green is at least 30 seconds If there is a pedestrian, green is at least 45 seconds. If a car is detected in the opposite direction, we go to yellow (as long as it has been green at least 30 seconds), and then go to green the other direction *even if the car is no longer waiting.* Also, if it is green in one direction and a pedestrian pushes the button in the same direction, it guarantees it will be green for at least 45 seconds longer *unless there is a pedestrian or car in the opposite direction at the same time or before the button was pressed.* Here are a few scenarios: EW Green - 30 seconds An EW Pedestrian pushes button We then guarantee that Green stays EW for 45 seconds.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}