Using Triple-Axis Magnetometer for Locating Magnets?

Hi all,

I am looking to program a system consisting of the Arduino Uno and HMC5883L Triple-Axis Magnetometer for the purpose of locating magnets in an area. However, when researching a solution for my task, I cannot find a good place to start my code.

Any suggestions for programming a triple axis magnetometer for the purpose of detecting the 'location' of a magnet will be greatly appreciated.

Thanks :)

Have you tried searching this forum for HMC5883L ?

I got just over 1500 results some of which might help you

Something like this?

The code is for a Raspberry but the principal is the same. There is a magnet on the end of the pendulum and the Magnetometer identifies what square it is under and then the software draws the line back to the centre.

The MagPi No. 59 July 2017 Free PDF download of back issues from the mag’s web page.