PiicoDev Motion Sensor MPU-6050 - could not communicate

Just connected a “PiicoDev Motion Sensor MPU-6050” via jumper cables and am getting this error “PiicoDev could not communicate with module at address 0x68, check wiring” when running the sample code exactly as is.

I’ve checked the wiring and as far as I’m aware it’s correct. The mapping and photos are below.

  • Pico 3v3 > Sensor 3.3v (red wire)
  • Pico GND > Sensor GND (black wire)
  • Pico GP4 (SDA) > Sensor SDA (blue wire)
  • Pico GP5 (SDL) > Sensor SDL (green wire)

The red light on the sensor comes on, but then just spits out the above mentioned error.

Any suggestions would be great, thanks,



2 Likes

Hey @Andrew4045 - welcome to the forums!

PiicoDev defaults to using I2C0 with SCL:9 and SDA:8, which is the default I2C configuration for RPi Pico.
Try moving your data and clock connections to those pins.

If you really want to stick to pins 4 and 5, see the PiicoDev_MPU6050 MicroPython Module for documentation about how to initialise the sensor with non-default pins.

Best of luck with your projects :smiley:

3 Likes

Thanks for that, worked perfectly. Was using those pins, but nothing that can’t be moved to make space.

2 Likes

Btw, the link to how to change the default pins doesn’t work.

2 Likes

Fixed!

2 Likes