I got this GY-521 module (https://www.aliexpress.com/item/MPU-6050-3-Axis-gyroscope-acce-lerometer-module-3V-5V-compatible-For-Arduino/2035920870.html?spm=2114.13010608.0.0.pRpLS4) and no matter what i try i cannot get my Raspberry Pi zero/3 to recognize it.

I connected the module as follows:

enter image description here

Module -> Pi
VCC ->  5v/3.3v (tried both options)
ADD -> GND/3.3v (tried both and without connecting ADD at all)

enter image description here

enter image description here

enter image description here

And from what i understand, i2c is installed and running fine:

pi@raspberrypi:~ $ ls -l /dev/i2c*
crw-rw---- 1 root i2c 89, 0 May 13 16:49 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 May 13 16:49 /dev/i2c-1

but when i try to run i2cdetect -y 1 all i get is an empty table (table of dashes) instead of seeing my module on address 68 or 69.

As soon as i connect the module, its green led lights up so i guess it gets its power but i cannot understand what i can do to make my pi recognize it :(

  • Everything you describe sounds correct. Could you add a photo clearly showing the connections between the Pi and the unit? We need to be able to trace from the Pi pins to named pins on the I2C module.
    – joan
    May 13, 2017 at 20:28
  • Can you look here and tell me if its ok or should i take more photos? imgur.com/a/KAlMu May 13, 2017 at 20:37
  • They look fine.
    – joan
    May 13, 2017 at 20:47
  • 2
    I'd power from 3V3 rather than 5V (white wire). I'd connect ADO to ground rather than 3V3 (orange wire). If that doesn't work I'd check the jumper wires for continuity.
    – joan
    May 13, 2017 at 21:38
  • 2
    The Pi pins 3/5 have hard-wired 1k8 ohm pull-ups to 3V3 specifically for I2C. If you look closely you will see them next to the pins. Like all GPIO they also have internal weak (50k) pull-ups/downs which can be enabled in software, but they are irrelevant here.
    – joan
    May 14, 2017 at 7:30

2 Answers 2


To get a similar Adafruit ADXL345 working on a Pi Zero, do the following:

sudo nano /etc/modules

add the lines:


save and exit. Also,

sudo raspi-config

and enable I2C.

sudo reboot

(you need to reboot to load the new modules you just added to /etc/modules). After this, running

i2cdetect -y 1

returns a value in the table. To use with python3, add the libraries:

sudo apt-get install python3-smbus i2c-tools

After this, python3 should also 'see' the accelerometer.


You can test the accelerometer with an Arduino UNO. If it does not work with an Arduino either, I think the module is faulty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.