2

I have linked this chip to my raspberry pi. I used these instructions to do it then installed everything I was told to install using these instructions. For some reason only two of the devices are showing when I run sudo i2cdetect -y 0 as you can see below:

enter image description here

I was wondering if would explain why the third device isn't showing up (which I think is the HMC5883L chip that is not showing up).

EDIT:

Wiring diagram:

enter image description here

SlySven
  • 3,631
  • 1
  • 20
  • 46
cross
  • 21
  • 2

1 Answers1

1

I had the same problem. The board is not faulty, the problem is caused by the MPU6050. Add these lines to the MPU6050 initialization process:

self.bus.write_byte_data(self.address, 0x37, 0x02)
self.bus.write_byte_data(self.address, 0x6A, 0x00)

so the whole MPU6050's initialization process is something like this:

self.bus = smbus.SMBus(1) // or 0, depends on the revision of the board
self.address = 0x68

self.bus.write_byte_data(self.address, PWR_MGMT_1, 0x80)
time.sleep(2)

...

self.bus.write_byte_data(self.address, 0x37, 0x02)
self.bus.write_byte_data(self.address, 0x6A, 0x00)

After running this code, type sudo i2cdetect -y 0, and the third device will show up. Hope it helps!

Alex
  • 195
  • 2
  • 10