|
DevLab_ICM20948 1.0.2
ICM-20948 9-Axis Motion Sensor Driver
|
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 | setup () |
| Configure Serial, I2C, sensor identity check, and enabled sensors. | |
| void | loop () |
| Read accelerometer, gyroscope, magnetometer, and temperature data. | |
Variables | |
| DevLab_ICM20948 | imu |
| Global ICM-20948 driver instance. | |
| #define I2C_FREQ 400000UL |
I2C bus speed in hertz.
Definition at line 37 of file i2c_basic.ino.
| #define ICM_ADDR 0x69 |
ICM-20948 I2C address selected by the AD0 pin.
Definition at line 39 of file i2c_basic.ino.
| #define SCL_PIN 7 |
I2C SCL pin used by the example board.
Definition at line 35 of file i2c_basic.ino.
| #define SDA_PIN 6 |
I2C SDA pin used by the example board.
Definition at line 33 of file i2c_basic.ino.
| void loop | ( | ) |
Read accelerometer, gyroscope, magnetometer, and temperature data.
Values are printed periodically to the Serial monitor in engineering units.
Definition at line 91 of file i2c_basic.ino.
| void setup | ( | ) |
Configure Serial, I2C, sensor identity check, and enabled sensors.
The sketch stops in an infinite loop if the IMU cannot be initialized or the WHO_AM_I register does not match the expected ICM-20948 value.
Definition at line 50 of file i2c_basic.ino.
| DevLab_ICM20948 imu |
Global ICM-20948 driver instance.
Definition at line 42 of file i2c_basic.ino.