Arduino sketch to calibrate the onboard magnetic compass.