Question: Please help Write an MSP430 C language program, which reads the room temperature (P1.0, A0) at power up and saves it in the variable roomtemp
Write an MSP430 C language program, which reads the room temperature (P1.0, A0) at power up and saves it in the variable "roomtemp" as a reference value. Then the program enters an infinite loop to constantly monitor the room temperature, and if at any point the temperature exceeds the reference value by 2%, then the program will turn the AC on (P1.4, active high). Once the temperature is back to the normal reading, the program turns the AC off. Assume the ReadAnalogValues () function is available for you, and once you call it, it returns the current temperature value in the variable "temp". Write an MSP430 C language program, which reads the room temperature (P1.0, A0) at power up and saves it in the variable "roomtemp" as a reference value. Then the program enters an infinite loop to constantly monitor the room temperature, and if at any point the temperature exceeds the reference value by 2%, then the program will turn the AC on (P1.4, active high). Once the temperature is back to the normal reading, the program turns the AC off. Assume the ReadAnalogValues () function is available for you, and once you call it, it returns the current temperature value in the variable "temp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
