Write a program for this application. A sensor measures the weight of the persons in an...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
Python class ElevatorSensor def initself maxweight pins selfmaxweight maxweight selfpins pins selfbu... View the full answer
Related Book For
Operating Systems Internals And Design Principles
ISBN: 9781292214290
9th Global Edition
Authors: Stallings William
Posted Date:
Students also viewed these computer network questions
-
In a pre-order traversal of this tree, what is the 9th value displayed?
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Suggest a good synthetic method for preparing each of the following haloalkanes from the corresponding alcohols. CH3 H3C CI I () CH-CH-CH,CI (b) CH;CH,CHCH,Br () (d) CH;CHCH(CH3)2
-
Which of the following is NOT a reason for a company to make a foreign direct investment? Protect foreign markets Protect domestic markets Reduce costs Move away from competitors
-
Find the directional derivative of ((x, y) = e-x cos y at (0, (/3) in the direction toward the origin.
-
The following selected accounts and balances appear on the adjusted trial balance for Ray Service, Inc., on December 31, 2010: 1. What is the net income or net loss? 2. What is the change in Retained...
-
The nancial statements of the Lance Armstrong Foundation (see Table 128) contain the following note titled Promises to Give: Unconditional promises to give were as follows at December 31: The...
-
The Cecil-Booker Vending Company changed its method of valuing inventory from the average cost method to the FIFO cost method at the beginning of 2024. At December 31, 2023, Inventories were $120,000...
-
John Henderson's will provides for the creation of a trust for the benefit of Holly Jones. Under the specific terms, the trust is required to distribute to Holly $50,000 cash and 1,000 shares of IBM...
-
Exercise 7-5 (Algo) Product and Customer Profitability Analysis [LO7-4, LO7-5] Thermal Rising, Incorporated, makes paragliders for sale through specialty sporting goods stores. The company has a...
-
1. How is consumer buying power affected by wealth and consumer credit? 2. How is buying power measured? Why should it be evaluated? 3. What factors influence a consumers willingness to spend? 4....
-
Q.943 An investor is interested in earning a risk-free profit on 100 United Arab Emirates Dirham (DUB) by venturing into the Canadian market. He finds out that the DUB/CAD exchange rate is 0.4, and...
-
Machine-hours Fixed manufacturing overhead cost Variable manufacturing overhead cost per machine-hour Molding 25,000 $ 740,000 $ 3.00 Fabrication 31,000 $ 260,000 $ 1.00 Total 56,000 $ 1,000,000...
-
1.What would be a dependent variable in the research study of the access to mental health services for first responders with ptsd? 2.What would be the operational definitions and how can an ordinal...
-
Part 2. In this economy there is one insurance company that offers simple medical insurance contracts where for a premium P it agrees to reimburse the policy holder an amount C...
-
A monoatomic crystalline solid comprises of N atoms, out of which natoms are in interstitial positions. If the available interstitial sites are N', then the number of possible microstates is
-
Modify the counter from Exercise 5.44 such that the counter will either increment by 4 or load a new 32-bit value, D, on each clock edge, depending on a control signal Load. When Load = 1, the...
-
Some operating systems have a treestructured file system but limit the depth of the tree to some small number of levels. What effect does this limit have on users? How does this simplify file system...
-
Briefly describe container virtualization.
-
Consider a hierarchical file system in which free disk space is kept in a free space list. a. Suppose the pointer to free space is lost. Can the system reconstruct the free space list? b. Suggest a...
-
Consider the common-base circuit in Figure 7.33 in the text. The transistor parameters are \(\beta=90, V_{E B}(\mathrm{on})=0.7 \mathrm{~V}\), and \(V_{A}=\infty\). A load capacitance of \(C_{L}=3...
-
For the circuit in Figure P7.39, the transistor parameters are: \(K_{n}=\) \(0.5 \mathrm{~mA} / \mathrm{V}^{2}, V_{T N}=2 \mathrm{~V}\), and \(\lambda=0\). Determine the maximum value of \(C_{L}\)...
-
Consider the circuit shown in Figure 7.25(a). The bias voltages are changed to \(V^{+}=3 \mathrm{~V}\) and \(V^{-}=-3 \mathrm{~V}\). The load resistor is \(R_{L}=20 \mathrm{k} \Omega\). The...
Study smarter with the SolutionInn App