In the previous post, I showed that the temperature sensor returns a more or less meaningles value anywhere between 0 and 1023. The lower the value, the lower the temperature.
I also showed how to get a voltage reading instead of just a number. Today, I post a link to an article that accompanies Oomlout‘s ARDX kit, about how to get an actual temperature from a temperature sensor.
Of course I could repeat all they say here and claim its my own, but as I learned it from using my ARDX kit, it is logical to point you to the source: http://www.oomlout.com/a/products/ardx/circ-10
Enjoy!


Hi Arno,
I had a similar problem with the temperature reading spiking so I used a smoothing method from the smoothing example sketch, and it worked for me:
const int numReadings = 10;
float readings[numReadings]; // the readings from the analog input
int index = 0; // the index of the current reading
float total = 0; // the running total
float average = 0; // the average
In Setup()
// initialize all the readings to 0:
for (int thisReading = 0; thisReading = numReadings)
// …wrap around to the beginning:
index = 0;
// calculate the average:
average = total / numReadings;
float Ctemperature = (average – 0.5) * 100;
float getVoltage(int pin){
return (analogRead(pin) * 0.004882814);
}
Hope this helps.