Question: One question about code programing and mbed simulator, i cant solve the this question Due to covid, there is a strict restriction on the total

One question about code programing and mbed simulator, i cant solve the this question Due to covid, there is a strict restriction on the total number of customers who can be in a shop at any momnt. You are required to design a system (by writing C code to the STM32L0 microcontroller) which counts the total number of customers available in the shop at any moment. The design specifications are as follows. i. There are two sensors attached to the entrance and exit of the shop, respectively. When a person enters or leaves the shop, the related sensor provides the value 1 for 100 milliseconds. The value of the entrance sensor can be read as integer variable E within the code. The value of the exit sensor can be read as integer variable X within the C code. ii. No two customers can enter or leave the shop together. Besides, a customer can leave the shop only 100 milliseconds after entering the shop. i. There is a function under mbed called "waitms(msed" which lets the microcontroller to stop operations for msec. iv. The counter should be reset at the beginning of the operation for accurate results. V. If the total number of customers exceed the allowed limit, let's say 20 customers, the system will alert the user by turning on the LED1 on the board. vi. The system will work all day long. One question about code programing and mbed simulator, i cant solve the this question Due to covid, there is a strict restriction on the total number of customers who can be in a shop at any momnt. You are required to design a system (by writing C code to the STM32L0 microcontroller) which counts the total number of customers available in the shop at any moment. The design specifications are as follows. i. There are two sensors attached to the entrance and exit of the shop, respectively. When a person enters or leaves the shop, the related sensor provides the value 1 for 100 milliseconds. The value of the entrance sensor can be read as integer variable E within the code. The value of the exit sensor can be read as integer variable X within the C code. ii. No two customers can enter or leave the shop together. Besides, a customer can leave the shop only 100 milliseconds after entering the shop. i. There is a function under mbed called "waitms(msed" which lets the microcontroller to stop operations for msec. iv. The counter should be reset at the beginning of the operation for accurate results. V. If the total number of customers exceed the allowed limit, let's say 20 customers, the system will alert the user by turning on the LED1 on the board. vi. The system will work all day long
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
