I do this in one program, but you will always get some toggling of the last bit of the result.
// Sample the LM34 a bunch of times then compute a nice smooth average temperature
temptot = 0;
for(x = 0; x < 64; x++) {
temptot += analogRead(LM34Pin);
}
temp = temptot >> 6; // divide by 64
What you could do then is to build in some hysteresis into the software by only acknowledging changes above your "noise" threshold. You could simply ignore the last bit.