Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Trouble with Compass using LSM303DLHC
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trouble with Compass using LSM303DLHC

by mhump2 on Tue Jun 02, 2020 7:41 pm

I'm working on an Arduino Uno and using an LSM303DLHC to try to make a compass. To start, I'm just using the example code from the Adafruit Website.

The issue I'm having is that the range seems very limited and inconsistent. For example, after slowly turning the sensor in a circle, it only goes from 150* to 280*. I would expect 0-360. Also, there are times when I return it to the same orientation, and it gives a different reading.

I'm not sure of the best way to orient the sensor for best accuracy when being used as a compass. I.e., horizontally with chip up/down or vertically.

Any tips or info is appreciated.

Thanks,
-Matt

mhump2
 
Posts: 9
Joined: Wed May 06, 2020 11:00 am

Please be positive and constructive with your questions and comments.