 
 byte displayNum[] = {off, off, off, off};  //array for display numbers from msb to lsb
 
-const long refreshInterval = 10; //refresh delay in microseconds
-long previousRefresh = 0; //previous refresh time
-int refreshLoop = 0;  //counter for refreshing loop
-
 void setup() {
   //setup  pin modes to output
   for (int i=0; i<4; i++)

  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);  
  pinMode(clockPin, OUTPUT);

  Serial.begin(9600);
}

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

  if (currentTempRefresh - previousTempRefresh > tempInterval) {
    previousTempRefresh = currentTempRefresh;

    double tempC = (500.0 * analogRead(tempPin)) / 1204; //poll analog to read value from LM35
    double aveTempC = smoothTemp(tempC);
    double tempF = c2f(aveTempC);

    splitNumber(tempF);
  }
