   Serial.print(c,HEX);
   Serial.print(F(", error = "));
   Serial.println(error,DEC);
- 
+    
  
   // Clear the 'sleep' bit to start the sensor.
   MPU6050_write_reg (MPU6050_PWR_MGMT_1, 0);
   Serial.println("\nI2C Scanner");
-  
+    }
 }
 void loop(){
 
 byte error, address;
+address=105;
   int nDevices;
   
   Serial.println(F("Scanning I2C bus (7-bit addresses) ..."));
-  
   nDevices = 0;
-  for(address = 1; address < 127; address++ )
-    {
+  for(int j=6;j<=10;j++)
+      {
+        if(flag!=j)
+        {
+        pinMode(j,OUTPUT);
+        digitalWrite(j,LOW);
+          
+        }
+      }
+      pinMode(flag,OUTPUT);
+      digitalWrite(flag,HIGH);
       // The i2c_scanner uses the return value of
       // the Write.endTransmisstion to see if
       // a device did acknowledge to the address.

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

    
          nDevices++;
        }
      else if (error==4)
        {
          Serial.print(F("Unknow error at address 0x"));
          if (address<16)
            Serial.print("0");
          Serial.println(address,HEX);
        }    
    }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else 
    Serial.println("done\n");
  
  //delay(5000);           // wait 5 seconds for next scan
}


// But only if the AD0 pin is low.
// Some sensor boards have AD0 high, and the
// I2C address thus becomes 0x69.
#define MPU6050_I2C_ADDRESS 0x69
 
 int flag=6;
// Declaring an union for the registers and the axis values.
// The byte order does not match the byte order of
// the compiler and AVR chip.
