|
DevLab_ICM20948 1.0.2
ICM-20948 9-Axis Motion Sensor Driver
|
Gyroscope DLPF and full-scale sweep for the DevLab ICM-20948. 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) |
| Apply one gyroscope full-scale and DLPF configuration. | |
| void | runSweep () |
| Run the gyroscope validation sweep and print each captured sample. | |
| void | setup () |
| Initialize I2C, reset/wake the IMU, enable gyro, and start the sweep. | |
| void | loop () |
| Empty loop; this sketch runs the gyroscope sweep once in setup(). | |
Variables | |
| const configDLPF | configsDLPF [] |
| const uint8_t | N_DLPF = sizeof(configsDLPF) / sizeof(configsDLPF[0]) |
| Number of gyroscope DLPF configurations. | |
| const ICM20948_Gyro_FullScale | gyroFSCfg [] |
| Gyroscope full-scale ranges exercised by the sweep. | |
| const char * | etiquetasGyroFSCfg [] = {"250", "500", "1000", "2000"} |
| Text labels matching gyroFSCfg. | |
| const uint8_t | N_FS = 4 |
| Number of gyroscope full-scale ranges. | |
| const ICM20948_Gyro_DLPF | gyroDLPF [] |
| Gyroscope DLPF enum values matching configsDLPF. | |
| const ICM20948_Gyro_Average | gyroAVGCfg [] |
| Gyroscope averaging settings available for experiments. | |
| const char * | etiquetasGyroAVGCfg [] = {"1","2","4","8","16","32","64","128"} |
| Text labels matching gyroAVGCfg. | |
| const uint8_t | N_AVG = 8 |
| Number of gyroscope averaging settings. | |
| DevLab_ICM20948 | imu |
| Global ICM-20948 driver instance. | |
Gyroscope DLPF and full-scale sweep for the DevLab ICM-20948.
Applies each gyroscope filter/full-scale configuration over I2C and prints repeated samples for validation and noise comparison.
Definition in file gyr_test.ino.
| #define I2C_FREQ 400000UL |
I2C bus speed in hertz.
Definition at line 19 of file gyr_test.ino.
| #define ICM_ADDR 0x69 |
ICM-20948 I2C address selected by the AD0 pin.
Definition at line 21 of file gyr_test.ino.
| #define SCL_PIN 7 |
I2C SCL pin used by the example board.
Definition at line 17 of file gyr_test.ino.
| #define SDA_PIN 6 |
I2C SDA pin used by the example board.
Definition at line 15 of file gyr_test.ino.
| bool applySettings | ( | uint8_t | fs_idx, |
| const configDLPF & | cfg | ||
| ) |
Apply one gyroscope full-scale and DLPF configuration.
| fs_idx | Index into gyroFSCfg. |
| cfg | DLPF timing and divider configuration. |
Definition at line 124 of file gyr_test.ino.
| void firstStage | ( | ) |
Verify the IMU identity register.
Definition at line 108 of file gyr_test.ino.
| void loop | ( | ) |
Empty loop; this sketch runs the gyroscope sweep once in setup().
Definition at line 239 of file gyr_test.ino.
| void printDobleLinea | ( | ) |
Print a double separator line to Serial.
Definition at line 103 of file gyr_test.ino.
| void printLinea | ( | ) |
Print a separator line to Serial.
Definition at line 101 of file gyr_test.ino.
| void runSweep | ( | ) |
Run the gyroscope validation sweep and print each captured sample.
Definition at line 149 of file gyr_test.ino.
| void setup | ( | ) |
Initialize I2C, reset/wake the IMU, enable gyro, and start the sweep.
Definition at line 194 of file gyr_test.ino.
| const configDLPF configsDLPF[] |
Definition at line 42 of file gyr_test.ino.
| const char* etiquetasGyroAVGCfg[] = {"1","2","4","8","16","32","64","128"} |
Text labels matching gyroAVGCfg.
Definition at line 93 of file gyr_test.ino.
| const char* etiquetasGyroFSCfg[] = {"250", "500", "1000", "2000"} |
Text labels matching gyroFSCfg.
Definition at line 64 of file gyr_test.ino.
| const ICM20948_Gyro_Average gyroAVGCfg[] |
Gyroscope averaging settings available for experiments.
Definition at line 81 of file gyr_test.ino.
| const ICM20948_Gyro_DLPF gyroDLPF[] |
Gyroscope DLPF enum values matching configsDLPF.
Definition at line 69 of file gyr_test.ino.
| const ICM20948_Gyro_FullScale gyroFSCfg[] |
Gyroscope full-scale ranges exercised by the sweep.
Definition at line 56 of file gyr_test.ino.
| DevLab_ICM20948 imu |
Global ICM-20948 driver instance.
Definition at line 98 of file gyr_test.ino.
| const uint8_t N_AVG = 8 |
Number of gyroscope averaging settings.
Definition at line 95 of file gyr_test.ino.
| const uint8_t N_DLPF = sizeof(configsDLPF) / sizeof(configsDLPF[0]) |
Number of gyroscope DLPF configurations.
Definition at line 53 of file gyr_test.ino.
| const uint8_t N_FS = 4 |
Number of gyroscope full-scale ranges.
Definition at line 66 of file gyr_test.ino.