     g_aPins[i].is_visible = true;
     g_aPins[i].value = 0.0;
     
-    for(int j=0; j<TOTAL_NUM_OF_PAST_VALUES; j++)
-      g_aPins[i].past_values[j] = 0.0;
+ //   for(int j=0; j<TOTAL_NUM_OF_PAST_VALUES; j++)
+  //    g_aPins[i].past_values[j] = 0.0;
+    g_aPins[i].prev_values = 0.0;
     
     g_aPins[i].is_timer_on = false;
     g_aPins[i].timer_value = 0.0;
     g_aPins[i].damping = 0;
+    g_aPins[i].prev_damping = 0;
     
     // Set pin connections
     memset(g_aPins[i].connections, '\0', sizeof(g_aPins[i].connections));

  int is_timer_on;
  float timer_value;
  int damping;
  boolean connections[TOTAL_NUM_OF_PINS];
  float past_values[TOTAL_NUM_OF_PAST_VALUES];
} 
Pin;

  /*
  {"status":<OK,ERROR>,  "pins":{"<0,1,…,13,A0,…,A5>":  {
  "label":"<label text>",  
	"is_analog":"<true,false>",  
	"is_input":"<true,false>", 
“sensitivity”:”<0.0,1.0>”, 
“is_inverted”:”<true,false>”, 
“is_visible”:”<true,false>”,
"value":"<0.0,1.0>",  },  ...,  }, 
"connections":[ {"source":"<0,1,…,13,A0,…,A5>","target":"<0,1,…,13,A0,…,A5>",”is_connected”:”<true,false>”},  ...,  ]  }
  */


Pin g_aPins[TOTAL_NUM_OF_PINS];


}

// Testing
//char pcTestBuffer[512] = "{\"status\":OK,\"pins\":{\"14\":{\"label\":\"A0\",\"is_analog\":\"true\",\"is_input\":\"true\",\"value\":\"0.5\"},\"3\":{\"label\":\"PWM3\",\"is_analog\":\"true\",\"is_input\":\"false\",\"value\":\"0.0\"}},\"connections\":[{\"source\":\"14\",\"target\":\"3\"}]}\"";

/* lyt_protocol*/
static int
