Member Since: August 5, 2011
Country: United States
Product SEN-00250 about 8 years ago
Here's the code for measuring temperature with Arduino for those who need it.
I'm measuring the voltage drop across the thermistor instead of the 10K resistor.
*remember to include the math.h library
5v|---|10kOhms|---|----|Thermistor|----|GND
A0
float ts1 = analogRead(A0);
ts1 = ts1 * 5 / 1023;
ts1 = ts1/((5 - ts1)/10000);
ts1 = 1 / ((.003354016)+(.0002569850(log(ts1/10000)))+(.000002620131(pow((log(ts1/10000)),2)))+(.00000006383091(pow((log(ts1/10000)),3))));
ts1 = ts1 - 273.15;
Serial.print("Sensor 1 Temperature = ");
Serial.print(ts1);
Serial.println(" Celcius ");
No public wish lists :(
Forgot your password?
No account? Register one!