The Yun has hardware bug 5.0V is not stable (~4.5V)
For correct results, using the 3.3v reference voltage as ARef instead of the messy 5V will be more precise and less noisy
ATmega32u4 code:
int sensorPin = 0;
void setup()
{
Serial.begin(9600);
// If you want to set the aref to something other than 5v
analogReference(EXTERNAL);
}
void loop() // run over and over again
{
int reading = analogRead(sensorPin);
float voltage = reading * 3.3;
voltage /= 1024.0;
Serial.print(voltage); Serial.println(" volts"); // print out the voltage
delay(1000); //waiting a second
}
the resolution is 10 mV / degree centigrade with a 500 mV offset to allow for negative temperatures