|
DevLab_ICM20948 1.0.2
ICM-20948 9-Axis Motion Sensor Driver
|
Extended accelerometer DLPF, full-scale, and averaging sweep. More...
Go to the source code of this file.
Classes | |
| struct | configDLPF |
| Gyroscope DLPF divider and timing configuration. More... | |
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 | firstStage () |
| Verify the IMU identity register. | |
| bool | applySettings (uint8_t fs_idx, const configDLPF &cfg, uint8_t avg) |
| Apply one accelerometer full-scale, DLPF, and averaging configuration. | |
| void | runSweep () |
| Run the full accelerometer validation matrix and print samples. | |
| void | setup () |
| Initialize I2C, reset/wake the IMU, enable sensors, and start sweep. | |
| void | loop () |
| Optional post-sweep loop for manual accelerometer reads. | |
Variables | |
| const configDLPF | configsDLPF [] |
| Accelerometer DLPF configurations exercised by this sweep. | |
| const uint8_t | N_DLPF = sizeof(configsDLPF) / sizeof(configsDLPF[0]) |
| Number of accelerometer DLPF configurations. | |
| const ICM20948_Accel_FullScale | accelCfg [] |
| Accelerometer full-scale ranges exercised by the sweep. | |
| const char * | etiquetasAccelCfg [] = { "+-2G","+-4G","+-8G","+-16G" } |
| Text labels matching accelCfg. | |
| const uint8_t | N_FS = 4 |
| Number of accelerometer full-scale ranges. | |
| const ICM20948_Accel_DLPFCFG | accelDLPF [] |
| Accelerometer DLPF enum values matching configsDLPF. | |
| const ICM20948_Accel_Average | accelAVG [] |
| Accelerometer averaging settings exercised by the sweep. | |
| const char * | etiquetasAccelAVG [] = { "14","8","16","32" } |
| Text labels matching accelAVG. | |
| const uint8_t | N_AVG = 4 |
| Number of accelerometer averaging settings. | |
| const uint16_t | accelSR [] |
| Raw accelerometer sample-rate divider values for experiments. | |
| const char * | etiquetasSR [] |
| Text labels matching accelSR output data rates. | |
| DevLab_ICM20948 | imu |
| Global ICM-20948 driver instance. | |
| uint8_t | total_pass = 0 |
| Count of validation passes reserved for future checks. | |
| uint8_t | total_fail = 0 |
| Count of validation failures reserved for future checks. | |
| uint8_t | total_warn = 0 |
| Count of validation warnings reserved for future checks. | |
Extended accelerometer DLPF, full-scale, and averaging sweep.
Runs a larger I2C validation matrix for the DevLab ICM-20948 accelerometer and prints CSV-like samples for later analysis.
Definition in file test2.ino.
| #define ICM_ADDR 0x69 |
| bool applySettings | ( | uint8_t | fs_idx, |
| const configDLPF & | cfg, | ||
| uint8_t | avg | ||
| ) |
Apply one accelerometer full-scale, DLPF, and averaging configuration.
| fs_idx | Index into accelCfg. |
| cfg | DLPF timing and divider configuration. |
| avg | Index into accelAVG. |
Definition at line 150 of file test2.ino.
| void firstStage | ( | ) |
| void loop | ( | ) |
| void printDobleLinea | ( | ) |
| void runSweep | ( | ) |
| void setup | ( | ) |
| const ICM20948_Accel_Average accelAVG[] |
Accelerometer averaging settings exercised by the sweep.
| const ICM20948_Accel_FullScale accelCfg[] |
Accelerometer full-scale ranges exercised by the sweep.
| const ICM20948_Accel_DLPFCFG accelDLPF[] |
Accelerometer DLPF enum values matching configsDLPF.
| const uint16_t accelSR[] |
| const configDLPF configsDLPF[] |
Accelerometer DLPF configurations exercised by this sweep.
| const char* etiquetasAccelAVG[] = { "14","8","16","32" } |
| const char* etiquetasAccelCfg[] = { "+-2G","+-4G","+-8G","+-16G" } |
| const char* etiquetasSR[] |
| DevLab_ICM20948 imu |
| const uint8_t N_AVG = 4 |
| const uint8_t N_DLPF = sizeof(configsDLPF) / sizeof(configsDLPF[0]) |
| const uint8_t N_FS = 4 |
| uint8_t total_fail = 0 |
| uint8_t total_pass = 0 |