Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Assignment #3 - Temperature Monitor use the DigitalIn, AnalogIn, and BusOut interfaces on the mbed microcontroller board to implement a simple...

Assignment #3 - Temperature Monitor use the DigitalIn, AnalogIn, and BusOut interfaces on the mbed microcontroller board to implement a simple temperature monitor. The MCP9700A is the indoor temperature sensor; its pinout is shown to the right. Connect the MCP9700A's +Vs pin to the mbed's VOUT pin, its Vout pin to the mbed's p19 pin, and its GND pin the mbed's GND pin. Do not confuse the MCP9700A's Vout pin with the mbed's VOUT pin. The voltage on the MCP9700A's Vout pin is related to its temperature by the following equation (with V in volts and T in degrees Celsius): V = 0.500 + 0.010T Connect three pushbutton switches between the mbed's VOUT and p21, p23, and p25 (one switch per pin). Connect the 7-segment LED display to the mbed as described in section 3.5.4 of the textbook (although I recommend inserting 220 ohm resistors in series with the LED segments, rather than a direct connection so that the current though the USB cable strictly complies with the specifcation). u need a program for the mbed that will periodically read and display the temperatures from the MCP9700A, either the current temperature or the record high temperature depending on the selected mode. Your program should use the mean average voltage from the temperature sensor (computed over at least 1000 samples) so that the displayed value does not fuctuate due to noise when the temperature is stable. The temperatures should be displayed in Celsius to the nearest tenth of a degree on the 7- segment display. Since the display can only display one digit, you must display the temperature one digit at a time. Display each digit for 0.5 - 1 seconds, then blank the display for 0.1 seconds (this way the user can distinguish a digit shown once from two digits with the same value shown consecutively). After displaying the temperature, the program should display either a "C" if this was the current temperature or "H" if this was the record high temperature. Note that the temperature might be less than 0, in which case you will need to display the leading negative sign (if you want to test this without a freezer, disconnect p19 from the MCP9700A and connect it instead to the mbed's GND; this corresponds to a temperature of around -50 C). Pressing the switch connected to p21 selects the current temperature mode. Pressing the switch connected to p23 selects the record high mode. If neither switch is pressed, the temperature mode is unchanged. Pressing the switch connected to p25 does not change the mode, but does reset the record high temperature to whatever is the current temperature. When your program starts, it should default to the current temperature mode. Your program should check the state of the switches at least once per temperature displayed (so the user might have to hold down the switch for an entire display cycle to switch modes). If you want to, you can detect mode changes more often, but you should completely display the temperature in one mode or the other (for example, don't display the frst digit from the current temperature and the second digit from the record high temperature). Note that your program should display temperatures even if the switches have never been pressed. Hints: For debugging purposes, it might be useful to use the Serial object to display intermediate results on your computer, although this is not a requirement for the assignment. Sections 6.2 and 6.4 of the textbook may also be useful. Also, since the voltages being measure from the temperature sensors are very small, even slight resistive voltage drops can skew the results; you should minimize this effect by sampling the temperatures only when the LED display is blank.