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!
Step 1 - Upload the SensorLab hardiron simplecal
Example
We have a simple sketch that will repeatedly read magnetometer data and calculate hard iron offsets
Open up the Adafruit_SensorLab->calibration->mag_hardiron_simplecal
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
Text editor powered by tinymce.