The Adafruit SensorLab – Magnetometer Calibration guide has been updated to include calibration instructions for the 9-DoF sensors using Raspberry Pi. Now you have an easy method for calibrating your 9-DoF sensors.
You can easily calibrate a sensor using the Raspberry Pi using our calibration script. It runs from the command line using Blinka. This page assumes you have already set up Blinka on the Raspberry Pi, but if not, be sure to follow our CircuitPython on Linux and Raspberry Pi guide.
The easiest way to connect a 9-DoF sensor to the Raspberry Pi is to use a STEMMA QT/Qwiic connector which many of our sensors include.