INT
pin is not supported. User must periodically read the data#include "mag3110.h"
mag3110_result_t mag_induction; // in units of 0.1[uT]
mag3110_handle_t mag3110_dev = mag3110_create(I2C_NUM_1);
mag3110_calibrate(mag3110_dev, 10000);
mag3110_start(mag3110_dev, MAG3110_DR_OS_10_128);
mag3110_get_magnetic_induction(mag3110_dev, &mag_induction);
ESP_LOGI("MAG3110 snippet", "mag_x:%i, mag_y:%i, mag_z:%i", mag_induction.x, mag_induction.y, mag_induction.z);
Copy to Clipboard
idf.py add-dependency "espressif/mag3110^1.0.7"
Copy to Clipboard
Copy to Clipboard