noob question on analogRead fluctuations

Nothing to do with the fluctuations but I noticed the following: void output_temperature(int pin) contains two ints whole and fraction. As an int (16 bit) can hold only +- 16384 as value. The reading * 49 causes an overflow. Define whole as a long (32 bit) and the math would go right.

You could also define a float for temperature, try this:

float tempvalue = analogRead(pin);
tempvalue = tempvalue * 4.9 / 10;
Serial.print("temperature: ");
Serial.print(tempvalue , 2);   // 2 decimals