I bought 2 and I think I’m having trouble with both. 1 definite problem with one, and a possible problem with the other.
My setup: Arduino IDE → I2C Digital Compass example → RedBoard Qwiic → Qwiic cable → Qwiic Micro Magnetometer - MMC5983MA
1st problem, maybe a redboard problem:
Readings are hovering around one of 3 positions.
Here’s a snippet of the readout from the serial monitor in Arduino IDE:
Heading: 132.9
Heading: 132.9
Heading: 132.8
Heading: 132.8
Heading: 132.8
Heading: 132.7
Heading: 151.1
Heading: 150.9
Heading: 150.7
Heading: 150.9
No matter what direction I point, it will be one of these 2 positions, or sometimes about 118.
Strangely, the problem does not occur on my other RedBoard, but both boards and both magnetometers are new.
Second problem (with a different magnetometer) / maybe not a problem?:
Running the Digital Compass example in Arduino IDE, When I point North, I see approx 360 degrees, but when I point the opposite direction (what I would assume to be South) I get about 220 degrees. I.e. North and South do not appear to be opposite. However, when I point at 180 degrees according to the magnetometer, and then 270 degrees, it is almost a perfect right angle (measured on paper).
Any help would be appreciated! Thanks