Compass Magnetic Compensation XY

760

12

1

Posted

Introduction: Compass Magnetic Compensation XY

In the course of making a little Arduino based robotic car using an HMC5883L compass module, I noticed the need to compensate magnetic errors. I could not find any simple compensation techniques for XY plane compensation. This simple, standalone code did it for me. Download the attached Arduino sketch file for an Arduino attached to an HMC5883L via SCL/SDA, invoke the serial monitor and follow the instructions embedded in the code. (INSTRUCTABLES non-pro really messes up code formatting, otherwise I would have pasted it here - sorry)

Share

    Recommendations

    • Microcontroller Contest

      Microcontroller Contest
    • Science of Cooking

      Science of Cooking
    • Pocket-Sized Contest

      Pocket-Sized Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments

    Thanks for sharing your solution!