Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a new program and add Serial.begin(9600) to setup (). Write a subroutine that can be used to convert the voltage reading into temperature
Create a new program and add Serial.begin(9600) to setup (). Write a subroutine that can be used to convert the voltage reading into temperature by the equation used in the previous section. Starter code is provided here and may need some modification to work with your specific sensor: #include double Thermistor (int RawADC) { double Temp; Temp log (10000.0*((1024.0/RawADC-1))); // =log (10000.0/(1024.0/RawADC-1)) // for pull-up configuration Temp = 1 / (0.001129148 + (0.000234125+ (0.0000000876741+ Temp * Temp )) * Temp ); Temp = Temp 273.15; // Convert Kelvin to Celcius Temp = (Temp* 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit return Temp; - } In this subroutine, the input value RawADC is the reading of the analog input port, and the output is the temperature measured using thermistor. Finish the code for loop() so that it can continuously reading the temperature every 1 sec. Send the reading back to PC using serial communication. Turn in your code and explain your design process.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started