   if (currentTempRefresh - previousTempRefresh > tempInterval) {
     previousTempRefresh = currentTempRefresh;
 
-    double tempC = (500.0 * analogRead(tempPin)) / 1204; //poll analog to read value from LM35 
-    double tempF = c2f(tempC);
+    double tempC = (500.0 * analogRead(tempPin)) / 1204; //poll analog to read value from LM35
+    double aveTempC = smoothTemp(tempC);
+    double tempF = c2f(aveTempC);
 
     splitNumber(tempF);
   }


double c2f (double c) {
  return ((9*c)/5 + 32);
}
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);  
  pinMode(clockPin, OUTPUT);
}

const long refreshInterval = 10; //refresh delay in microseconds
long previousRefresh = 0; //previous refresh time
int refreshLoop = 0;  //counter for refreshing loop

void loop() {
  //current timer variables to reset at each iteration
