 const int capacitorChargePin2 = 4;
 
 const int imuRate = 10; /* sampling rate in Hz */
-const float capacitorRate = 1; //dedicate to capacitor every  10 seconds
+const float capacitorRate = .5; //dedicate to capacitor every  10 seconds
 const int muxRate = 10;
 
 int muxChoice = 0;

  }
  delay(del);

  Serial.print("], \"capacitor2\": [");
  Serial.print(capacitor2Data[0]);
  for (int i = 1; i< index;i++){
    delay(del);
    Serial.print(", ");
    Serial.print(capacitor2Data[i]);       
  }
  delay(del);
  Serial.print("],");
  Serial.print("\"capacitorIime\": [");
  Serial.print( capacitorTimeData[0]);

  /* dicharge the capacitor  */
  digitalWrite(capacitorChargePin1, LOW);             // set charge pin to  LOW 
  digitalWrite(capacitorChargePin2, LOW);             // set charge pin to  LOW 
}  

void samplePorts() /*sample ports and send over serial according to rates*/ 

