0

I am trying to set up my magnetometer QMC5883L with my raspberry pi 4.

But the pi is somehow not reading the magnetometer.

I ran the command i2cdetect -y 1, but there is no detection.

My connections seem to be secure, and I have installed and updated all the necessary components also:

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install i2c-tools
  4. sudo apt-get install python-smbus
  5. sudo apt-get install python3

I have set up the i2c interface active as well, using:

sudo raspi-config -> Interface -> i2c -> "YES"

I have also crossed checked the presence of all the required kernels at boot up time

  1. i2c-dev
  2. i2c-bcm2835
  3. snd-bcm2835

I am still not able to figure out what the issue exactly is, have I missed some module or kernel out ?

Following is the link of the module/sensor being used:

https://robu.in/product/gy-271-hmc5883l-3-axis-electronic-compass-module-magnetic-field-sensor-china-chip/

(The above link has all the attachments like datasheet and library of the magnetometer)

0

You have not properly connected the device to the I2C bus.

Can not say any more than that as there is no link to the device being used or clear photos of the wiring.

4
  • I have added the link of the magnetometer which I missed out on earlier. Hopefully this can give a better picture of my dilemma.
    – Omickey
    Jul 17 at 7:36
  • We need a clear photo showing the wiring. A common error is to not solder the header pins to the device.
    – joan
    Jul 17 at 9:02
  • Okay, I shall update a picture asap, but does the rest look fine ?
    – Omickey
    Jul 17 at 10:30
  • turns out it was a soldering issue, thanks for the help @joan
    – Omickey
    Jul 21 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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