Hi there.
I'm trying a code found on: Arduino Playground - Thermistor2
#include <math.h>
double Thermister(int RawADC) {
double Temp;
Temp = log(((10240000/RawADC) - 10000));
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;
}
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(int(Thermister(analogRead(0)))); // display Fahrenheit
delay(100);
}
I have no errors during compiling.
My serial monitor gives me some nice Icelandic? symbols:
þÿÿÿÿþÿþÿÿþÿþþÿÿÿþÿÿÿþþÿÿþ
In my compiler #include <math.h> is not colored orange.
My system spec.
OS: Linux Ubuntu 11.10
Compiler: Arduino 0022ubuntu0.1
Does the message in my serial monitor mean that math.h is not installed on my comp?
If this is the case, does someone know how I get this file installed in the correct directory?
Kind regards.