This example puts the chip in active and standby mode.
#include <iostream>
#include <chrono>
#include <thread>
#include "mag3110.hpp"
int main(int argc, char** argv)
{
cout << (mag.
isActive() ?
"Mode: active" :
"Mode: standby") << endl;
cout << (mag.
isActive() ?
"Mode: active" :
"Mode: standby") << endl;
cout << (mag.
isActive() ?
"Mode: active" :
"Mode: standby") << endl;
cout << (mag.
isActive() ?
"Mode: active" :
"Mode: standby") << endl;
cout << (mag.
isActive() ?
"Mode: active" :
"Mode: standby") << endl;
cout << (mag.
isActive() ?
"Mode: active" :
"Mode: standby") << endl;
cout << (mag.
isActive() ?
"Mode: active" :
"Mode: standby") << endl;
return 0;
}