I have recently purchased 2 module of Sparkfun Breakout Board ICM-20948 but unfortunately both the board’s Magnetometer behavior opposite so one of me Module is working fine and his heading angle Match with the my Mobile Compass and when i rotate module i got 0-360 degree of rotation. Now my same code to test another one module i didn’t match my mobile compass angle as well as not rotating more then 190 degree.
So i have check calibration of both the module and i looking good to me because this sensor made round shape in all the drops so i assume that my both sensor is well calibrated.
Now can you help me to short this issue or tell me this is issue with my Sensor Module or my Code side or Calibration side?
That’s odd; are they being tested/used in the same area? Anything different about the EMF for one vs the other?
Were they programmed exactly the same way? (be sure to fully close the IDE, disconnect everything, then start fully fresh…and match the sensors’ positions to being the same, and with the same calibration routine performed in the same place/position)
Magnetometers must be calibrated to be useful as compasses. Even slight manufacturing differences can lead to magnetized components on the board, which will severely distort the Earth’s magnetic field.