     x_gyro += accel_t_gyro.value.x_gyro;
     y_gyro += accel_t_gyro.value.y_gyro;
     z_gyro += accel_t_gyro.value.z_gyro;
-    delay(100);
+    delay(10);
   }
   x_accel /= num_readings;
   y_accel /= num_readings;

 
  while (!Serial);             // Leonardo: wait for serial monitor
  int i;
  pinMode(12,OUTPUT);
        digitalWrite(12,LOW);
    for(i=6;i<=9;i++)
    {
      for(int j=6;j<=12;j++)
      {
        if(i!=j)
        {

  float                 y_gyro = 0;
  float                 z_gyro = 0;
  accel_t_gyro_union    accel_t_gyro;
for(int j=6;j<=10;j++)
      {
        
        pinMode(j,OUTPUT);
        digitalWrite(j,LOW);
      
      }  
  pinMode(6,OUTPUT);
        digitalWrite(6,HIGH);
  //Serial.println("Starting Calibration");

  // Discard the first set of values read from the IMU
