So here is a quick info for GY-521 to work with Arduino Uno R3 for I2C scanner
Arduino gy-521
+5V==>VCC
GND==>GND
SCL==>SCL
SDA==> SDA
Digital pin 2 ===> INT
Once this setup is completed, write the following code in the I2C setup function
pinMode(A4, INPUT);
pinMode(A5, INPUT);
digitalWrite(A4,LOW);
digitalWrite(A5,LOW);
Now you'll definitely see the I2C device being scanned. Else you will have to pull all the hair from your head ![]()