I want to build a compass and be able to lock in a heading. As I drift off that heading a light bar will show which direction to adjust to get back on course.
I'm using a 9 dof LSM9DS1 sensor from Adafruit . It's wired up and I'm getting data from it that changes as I move it around.
The first of many questions:
How do I convert the data from the magnetometer to show degrees? I spent most of the afternoon poking around trying to find some code or formula with no success. I'm sure I'm just using the wrong search words.
Any links or existing to code do this will be appreciated.
Thanks