int reading = analogRead(A0);
Serial.print("A0 reading = "); Serial.println(reading);
float voltage = reading * .95731;
// print out the voltage
Serial.print(voltage); Serial.println(" millivolts");
// now print out the temperature
float temperatureC = ((voltage - 500) / 10) ; //converting from 10 mv per degree wit 500 mV offset
//to degrees ((voltage - 500mV) times 100)
Serial.print(temperatureC); Serial.println(" degrees C");
I've got an Adafruit Huzzah board running this snippet of code and it works reliably. It uses dweet.io to send the temperature to freeboard.io and works nicely.