Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need a C program code for this question which is clear and well detailed An automated traffic light system, which follows the UK standard

i need a C program code for this question which is clear and well detailed
image text in transcribed
An automated traffic light system, which follows the UK standard traffic light sequence (Red - Red and Amber - Green - Amber Red), is being used to control flow of traffic along a road. There is a pedestrian crossing at this traffic light. The pedestrian crossing uses an image recognition sensor (51) to count the number of people present, before changing the light sequence to allow the pedestrians to cross. There is a red LED and green LED on the pedestrian crossing, instructing pedestrians whether it is safe to cross. There is also a sensor which counts the number of cars present (52). The count is checked every 5 seconds. If more people are waiting to cross the road (sensor S1) than cars have been counted (S2) then the lights will stop traffic and the crossing will allow 20 seconds for pedestrians to cross. The maximum time pedestrians will have to wait after the first person is detected 60 seconds, independent of the number of people waiting to cross. Each of the two sensors is simulated using a 4-bit digital input to the microcontroller, the value of the Inputs representing the number of cars or pedestrians counted. There is also a fault sensor (53), which checks the pedestrian crossing and car sensors and, if a fault is detected, then the red pedestrian crossing light and amber traffic light should both flash to warn drivers and pedestrians of an issue with the crossing. You will design this system using KL252 as the microcontroller to control the above operation. Write a C program that allows a KL25Z to read the values from all sensors and to control the status of the traffic lights and pedestrian crossing. Initially, the traffic light is on green, and the pedestrian crossing is on red

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions