-// MPU-6050 Short Example Sketch
-// By Arduino User JohnChi
-// August 17, 2014
-// Public Domain
+//Flick Project
 #define SDA_PORT PORTD
 #define SDA_PIN 4
 #define SCL_PORT PORTD

  Serial.println("\nI2C Scanner");
    }
      mySerial.begin(115200);

}
void loop(){

byte error, address;
address=105;
  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);
      // The i2c_scanner uses the return value of
      // the Write.endTransmisstion to see if
      // a device did acknowledge to the address.
      Wire.beginTransmission(address);
      error = Wire.endTransmission();
      
      if (error == 0)

// lower address, so that has to be corrected.
// The register part "reg" is only used internally,
// and are swapped in code.

typedef union accel_t_gyro_union
{
  struct
