   int is_timer_on;
   float timer_value;
   unsigned long timer_start_time;
+  boolean timer_running;
   int damping;
   int prev_damping;
   boolean connections[TOTAL_NUM_OF_PINS];
 //  float past_values[TOTAL_NUM_OF_PAST_VALUES];
-  float prev_values;
+  float prev_value;
 } 
 Pin;
 

    fPinValSum = g_aPins[_iOutPinNum].value;
  else
    g_aPins[_iOutPinNum].value = fPinValSum;
  
  //Serial.print("Analog Pin #: "); Serial.print(_iOutPinNum); Serial.print(" Total Value: "); Serial.println(fPinValSum);

  // Set pin value to zero if timer expired
  if( g_aPins[_iOutPinNum].is_timer_on ) 
  {
//    Serial.print("Pin ");Serial.print(_iOutPinNum);Serial.print(" timer ON");
//    Serial.print(" Start Time: ");Serial.println(g_aPins[_iOutPinNum].timer_start_time);
    if( (millis() - g_aPins[_iOutPinNum].timer_start_time) >= (g_aPins[_iOutPinNum].timer_value-1)*1000 ) // Timer expired
    {
//      Serial.println("EXPIRED...!!!");
      fPinValSum = 0.0;
      g_aPins[_iOutPinNum].value = fPinValSum;      
    }
  }
  
  return fPinValSum;
}

    
 //   for(int j=0; j<TOTAL_NUM_OF_PAST_VALUES; j++)
  //    g_aPins[i].past_values[j] = 0.0;
    g_aPins[i].prev_value = 0.0;
    
    g_aPins[i].is_timer_on = false;
    g_aPins[i].timer_value = 0.0;
    g_aPins[i].timer_start_time = 0;
    g_aPins[i].timer_running = false;
    g_aPins[i].damping = 0;
    g_aPins[i].prev_damping = 0;
    
