       break;
     }
   }
+
   while ( (cap1Value < 800 || cap2Value < 800) && index <= length);
 
   delay(del);

const int capacitorChargePin2 = 4;

const int imuRate = 10; /* sampling rate in Hz */
const float capacitorRate = 1; //dedicate to capacitor every  10 seconds
const int muxRate = 10;

int muxChoice = 0;

  }
  delay(del);

 // Serial.print("]}");
//  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]);
