Question: Write a program for this application. A sensor measures the weight of the persons in an elevator and gives the measurement as a digital

Write a program for this application. A sensor measures the weight of the persons in an elevator and gives

Write a program for this application. A sensor measures the weight of the persons in an elevator and gives the measurement as a digital value. The sensor is connected to 4 pins so the measurement can be a binary number from 0000 to 1111. Select the pins of the sensor. If the measurement is larger than the maximum value (100): (1) the elevator's motor should not work by outputting 0 one pin (called Px), (2) the buzzer should make a siren to alarm the people, and (3) turn an LED. As long as the weight is more than the maximum, (1), (2) and (3) should be active. When the weight becomes less than the maximum value, the buzzer and the LED should be off and the elevator motor should work by putting I on Px.

Step by Step Solution

3.30 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Python class ElevatorSensor def initself maxweight pins selfmaxweight maxweight selfpins pins selfbu... View full answer

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 Computer Network Questions!