I am using the magnetic threshold function to generate an interrupt when the threshold value is exceeded. My threshold is 1000 counts. At the moment with my magnetometer in its final position is 800-900 counts, Which is too close to my threshold value for my liking. Is there a way to calibrate the z-axis to subtract this 800-900 (new reference or offset)?
I am thinking a one off calibration, take 10 readings and get an average and subtract this from m_offset_z register?
Any help would be greatly appreciated?