Quantcast
Channel: Sensors - Arduino Forum
Viewing all articles
Browse latest Browse all 1149

HMC5883 not working as expected

$
0
0

Hello there. I have a problem with my HMC5883 sensor. At first I try using the adafruit example script. And it works fine, with only slight deviation from the compass in my phone. Then I try writing my own code using the example script as a reference. Only differences is my code doesn't print the serial value and sensor data, different serial baudrate, etc. then disaster strike. The bearing suddenly become unusable. Firstly the value always start with 2, so for example I can't get something like 170 degrees, or 90 degrees even after spinning the sensor in full 360 degrees. At the time I assume my code is faulty. So I reflashed the example script. And the same problem continue. I monitored the raw value. And the x and y somehow can't never get over 90. No matter how I move the sensor.

Please help. Thank you in advance.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1149

Trending Articles