Calibrate the magnetic field to read approximately zero by applying an offset to the raw sensor values.
#include <iostream>
#include <chrono>
#include <thread>
#include "mag3110.hpp"
int main(int argc, char** argv)
{
int bxoff, byoff, bzoff;
cout << "Offsets: " << bxoff << ", " << byoff << ", " << bzoff << endl;
int bx, by, bz;
double magnitude;
while (true) {
this_thread::sleep_for(chrono::seconds(1));
}
return 0;
}