|
DevLab_ICM20948 1.0.2
ICM-20948 9-Axis Motion Sensor Driver
|
Magnetometer operation-mode sweep for the DevLab ICM-20948. More...
Go to the source code of this file.
Macros | |
| #define | SDA_PIN 6 |
| I2C SDA pin used by the example board. | |
| #define | SCL_PIN 7 |
| I2C SCL pin used by the example board. | |
| #define | I2C_FREQ 400000UL |
| I2C bus speed in hertz. | |
| #define | ICM_ADDR 0x69 |
| ICM-20948 I2C address selected by the AD0 pin. | |
Functions | |
| void | printLinea () |
| Print a separator line to Serial. | |
| void | printDobleLinea () |
| Print a double separator line to Serial. | |
| void | applySettings () |
| Initialize the magnetometer and collect samples for each mode. | |
| void | setup () |
| Initialize I2C, verify the IMU, enable sensors, and start the sweep. | |
| void | loop () |
| Empty loop; this sketch runs the magnetometer sweep once in setup(). | |
Variables | |
| DevLab_ICM20948 | imu |
| Global ICM-20948 driver instance. | |
| const ICM20948_Op_Mode | opMode [] |
| Magnetometer operating modes tested by the sweep. | |
| const char * | etiquetasOpModeCfg [] |
| Text labels matching the operating modes printed in the sweep. | |
| const uint8_t | N_OPM = 6 |
| Number of printable magnetometer operation modes. | |
Magnetometer operation-mode sweep for the DevLab ICM-20948.
Initializes the AK09916 magnetometer through the ICM-20948 internal I2C master, iterates through continuous measurement modes, and prints CSV-like magnetic field samples to the Serial monitor.
Definition in file mag_test.ino.
| #define I2C_FREQ 400000UL |
I2C bus speed in hertz.
Definition at line 20 of file mag_test.ino.
| #define ICM_ADDR 0x69 |
ICM-20948 I2C address selected by the AD0 pin.
Definition at line 22 of file mag_test.ino.
| #define SCL_PIN 7 |
I2C SCL pin used by the example board.
Definition at line 18 of file mag_test.ino.
| #define SDA_PIN 6 |
I2C SDA pin used by the example board.
Definition at line 16 of file mag_test.ino.
| void applySettings | ( | ) |
Initialize the magnetometer and collect samples for each mode.
Definition at line 53 of file mag_test.ino.
| void loop | ( | ) |
Empty loop; this sketch runs the magnetometer sweep once in setup().
Definition at line 138 of file mag_test.ino.
| void printDobleLinea | ( | ) |
Print a double separator line to Serial.
Definition at line 30 of file mag_test.ino.
| void printLinea | ( | ) |
Print a separator line to Serial.
Definition at line 28 of file mag_test.ino.
| void setup | ( | ) |
Initialize I2C, verify the IMU, enable sensors, and start the sweep.
Definition at line 91 of file mag_test.ino.
| const char* etiquetasOpModeCfg[] |
Text labels matching the operating modes printed in the sweep.
Definition at line 44 of file mag_test.ino.
| DevLab_ICM20948 imu |
Global ICM-20948 driver instance.
Definition at line 25 of file mag_test.ino.
| const uint8_t N_OPM = 6 |
Number of printable magnetometer operation modes.
Definition at line 48 of file mag_test.ino.
| const ICM20948_Op_Mode opMode[] |
Magnetometer operating modes tested by the sweep.
Definition at line 33 of file mag_test.ino.