Question: An embedded system is used to control the access to a room. Employees need to swipe their Id cards in order to unlock the door.

An embedded system is used to control the access to a room. Employees need to swipe their Id cards in order to unlock the door. The Id number is read through PORTD. The magnetic system that is used to lock or unlock the door is connected to pin 0 of PORTC through a relay. If the voltage of this pin is 5 V (high) then the door opens. In this exercise, 10 employees are allowed to access the room. Design and test the embedded system to read the ID number and to unlock the door for 20sec if the Id is valid. An LED turn green if the door opens otherwise a red LED is on.

a) Give a flowchart of the algorithm

b) Translate this algorithm to a C program. Use tables for the Id numbers.

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!