   Serial.println("\nI2C Scanner");
     }
       mySerial.begin(115200);
-
+      calibrate_sensor1();
+      set_last_read_angle_data(millis(), 0, 0, 0, 0, 0, 0, 0);
+      calibrate_sensor2();
+      set_last_read_angle_data(millis(), 0, 0, 0, 0, 0, 0, 1);
+      calibrate_sensor3();
+      set_last_read_angle_data(millis(), 0, 0, 0, 0, 0, 0, 2);
+      calibrate_sensor4();
+      set_last_read_angle_data(millis(), 0, 0, 0, 0, 0, 0, 3);
+      calibrate_sensor5();
+      set_last_read_angle_data(millis(), 0, 0, 0, 0, 0, 0, 4);
 }
+
+
+
+
 void loop(){
 
 byte error, address;
 address=105;
-  int nDevices;
-  
-  Serial.println(F("Scanning I2C bus (7-bit addresses) ..."));
-  nDevices = 0;
+  //int nDevices;
+  
+  //Serial.println(F("Scanning I2C bus (7-bit addresses) ..."));
+  //nDevices = 0;
   for(int j=6;j<=10;j++)
       {
         if(flag!=j)
         {
         pinMode(j,OUTPUT);
         digitalWrite(j,LOW);
-          
         }
       }
       pinMode(flag,OUTPUT);
       digitalWrite(flag,HIGH);
+      if(flag==6)
+      {
+        mpunumber1();
+        delay(1000);
+      }
+      if(flag==7)
+      {
+        mpunumber2();
+        delay(1000);
+      }
+       if(flag==8)
+       {
+        mpunumber3();
+        delay(1000);
+      }
+       if(flag==9)
+       {
+        {
+        mpunumber4();
+        delay(1000);
+      }
+       }
+       if(flag==10)
+       {
+        mpunumber5();
+        flag=6;
+        delay(1000);
+      }
+       else
+        ++flag;
       // The i2c_scanner uses the return value of
       // the Write.endTransmisstion to see if
       // a device did acknowledge to the address.
-      Wire.beginTransmission(address);
+      /*Wire.beginTransmission(address);
       error = Wire.endTransmission();
       
       if (error == 0)

    mySerial.println("The Gyro Z value is : ");
    mySerial.print(accel_t_gyro.value.z_gyro);
        mySerial.print("\n");

  //Serial.print(F(", "));
  //Serial.println(F(""));
 
 //delay(1000);

    
          nDevices++;
          

  dT = ( (double) accel_t_gyro.value.temperature + 12412.0) / 340.0;
  Serial.print(dT, 3);
  Serial.print(F(" degrees Celsius"));
  Serial.println(F(""));
 
 
  // Print the raw gyro values.
