If you don't want to set up a graphical interface for calibration a magnetic sensor, you can do a simple hard iron calibration using just the serial interface. The nice thing about this is it will work for any and all boards, and does not require any additional software installation!
hardiron simplecal Example
We have a simple sketch that will repeatedly read magnetometer data and calculate hard iron offsets
Open up the
Open the serial port to launch the SensorLab calibration. You should see your magnetometer detected
Spin the board around until you see the last three numbers settle closer to each other and range from 25uT to 65uT
The middle three numbers are the hard offsets in uTesla.
In this case shown below, the screenshot indicates
x = -5.68, y = 7.48, z = 19.34