Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 - 01) (8 points) Due to pandemic, there is a strict restriction on the total number of customers who can be in a shop

image text in transcribed

image text in transcribed

image text in transcribed

1 - 01) (8 points) Due to pandemic, there is a strict restriction on the total number of customers who can be in a shop at any moment. For our case, the maximum number of customers in the shop can be 20. You are required to design a system (by writing C code to the mbed simulator) which counts the total number of customers available in the shop at any moment. The design specifications are as follows. PLEASE READ BEFORE ANSWERING THE QUESTION! 1. Your answers must be compatible with mbed simulator "even if you cannot use it. Other solutions will not be graded. 2. Answer the questions to their designated places. Only the code lines written to the designated answer section will be graded. Extra code lines added to a section will result in "zero" points for that section. a. (4 points) There are two sensors attached to the entrance and exit of the shop. When a person enters or leaves the shop, the related sensor provides a port interrupt. No two customers can enter or leave the shop together. Form the interrupt callback functions for this purpose. 2- 21) (8 points) Due to pandemic, there is a strict restriction on the total number of customers who can be in a shop at any moment. For our case, the maximum number of customers in the shop can be 20. You are required to design a system (by writing C code to the mbed simulator) which counts the total number of customers available in the shop at any moment. The design specifications are as follows. PLEASE READ BEFORE ANSWERING THE QUESTION! 1. Your answers must be compatible with mbed simulator "even if you cannot use it. Other solutions will not be graded. 2. Answer the questions to their designated places. Only the code lines written to the designated answer section will be graded. Extra code lines added to a section will result in "zero" points for that section. b. (3 points) There is an LED which indicates the total number of customers in the shop. If there are no customers, the LED will turn off. If there are 20 customers in the shop, the LED will be in its brightest form. When the number of customers is between 0 and 20, the brightness of the LED will be adjusted linearly with respect to the customer number. Form the code block for this purpose. 3. 01) (8 points) Due to pandemic, there is a strict restriction on the total number of customers who can be in a shop at any moment. For our case, the maximum number of customers in the shop can be 20. You are required to design a system (by writing C code to the mbed simulator) which counts the total number of customers available in the shop at any moment. The design specifications are as follows. PLEASE READ BEFORE ANSWERING THE QUESTION! 1. Your answers must be compatible with mbed simulator "even if you cannot use it. Other solutions will not be graded 2. Answer the questions to their designated places. Only the code lines written to the designated answer section will be graded. Extra code lines added to a section will result in "zero" points for that section. C. (1 points) Form the main function, interrupt definitions, and global variables in your code such that it works on the mbed simulator. 1 - 01) (8 points) Due to pandemic, there is a strict restriction on the total number of customers who can be in a shop at any moment. For our case, the maximum number of customers in the shop can be 20. You are required to design a system (by writing C code to the mbed simulator) which counts the total number of customers available in the shop at any moment. The design specifications are as follows. PLEASE READ BEFORE ANSWERING THE QUESTION! 1. Your answers must be compatible with mbed simulator "even if you cannot use it. Other solutions will not be graded. 2. Answer the questions to their designated places. Only the code lines written to the designated answer section will be graded. Extra code lines added to a section will result in "zero" points for that section. a. (4 points) There are two sensors attached to the entrance and exit of the shop. When a person enters or leaves the shop, the related sensor provides a port interrupt. No two customers can enter or leave the shop together. Form the interrupt callback functions for this purpose. 2- 21) (8 points) Due to pandemic, there is a strict restriction on the total number of customers who can be in a shop at any moment. For our case, the maximum number of customers in the shop can be 20. You are required to design a system (by writing C code to the mbed simulator) which counts the total number of customers available in the shop at any moment. The design specifications are as follows. PLEASE READ BEFORE ANSWERING THE QUESTION! 1. Your answers must be compatible with mbed simulator "even if you cannot use it. Other solutions will not be graded. 2. Answer the questions to their designated places. Only the code lines written to the designated answer section will be graded. Extra code lines added to a section will result in "zero" points for that section. b. (3 points) There is an LED which indicates the total number of customers in the shop. If there are no customers, the LED will turn off. If there are 20 customers in the shop, the LED will be in its brightest form. When the number of customers is between 0 and 20, the brightness of the LED will be adjusted linearly with respect to the customer number. Form the code block for this purpose. 3. 01) (8 points) Due to pandemic, there is a strict restriction on the total number of customers who can be in a shop at any moment. For our case, the maximum number of customers in the shop can be 20. You are required to design a system (by writing C code to the mbed simulator) which counts the total number of customers available in the shop at any moment. The design specifications are as follows. PLEASE READ BEFORE ANSWERING THE QUESTION! 1. Your answers must be compatible with mbed simulator "even if you cannot use it. Other solutions will not be graded 2. Answer the questions to their designated places. Only the code lines written to the designated answer section will be graded. Extra code lines added to a section will result in "zero" points for that section. C. (1 points) Form the main function, interrupt definitions, and global variables in your code such that it works on the mbed simulator

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

Step: 3

blur-text-image

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

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

Question Can a self-employed person adopt a money purchase plan?

Answered: 1 week ago

Question

Can workers be trained in ethics? How? Defend your answer.

Answered: 1 week ago

Question

2. Enrolling employees in courses and programs.

Answered: 1 week ago

Question

1. Communicating courses and programs to employees.

Answered: 1 week ago