Basic example to read the magnetic field from the MAG3110 sensor
#include <iostream>
#include <chrono>
#include <thread>
#include "mag3110.hpp"
int main(int argc, char** argv)
{
cout << (mag.
isRaw() ?
"Mode: raw" :
"Mode: not raw") << endl;
cout << (mag.
isRaw() ?
"Mode: raw" :
"Mode: not raw") << endl;
cout << (mag.
isRaw() ?
"Mode: raw" :
"Mode: not raw") << endl;
cout << (mag.
isRaw() ?
"Mode: raw" :
"Mode: not raw") << endl;
return 0;
}