|
DevLab_ICM20948 1.0.2
ICM-20948 9-Axis Motion Sensor Driver
|
#include <DevLab_ICM20948.h>Go to the source code of this file.
Macros | |
| #define | CS_PIN D10 |
| Chip-select pin for SPI. | |
| #define | SPI_FAST_SPEED 1000000 |
| SPI clock used during sensor initialization and reads. | |
Functions | |
| SPIClass | spi_bus (SPI) |
| SPI bus object used by the IMU driver. | |
| void | setup () |
| Configure I2C, verify the IMU, and initialize the magnetometer. | |
| void | loop () |
| Read and print magnetometer data in microtesla. | |
Variables | |
| DevLab_ICM20948 | imu |
| Global ICM-20948 driver instance. | |
| #define CS_PIN D10 |
Chip-select pin for SPI.
Definition at line 38 of file spi_magneto.ino.
| #define SPI_FAST_SPEED 1000000 |
SPI clock used during sensor initialization and reads.
Definition at line 42 of file spi_magneto.ino.
| void loop | ( | ) |
Read and print magnetometer data in microtesla.
Definition at line 82 of file spi_magneto.ino.
| void setup | ( | ) |
Configure I2C, verify the IMU, and initialize the magnetometer.
The magnetometer is accessed through the ICM-20948 internal I2C master, so initMag() must succeed before loop() can read magnetic field data.
Definition at line 57 of file spi_magneto.ino.
| SPIClass spi_bus | ( | SPI | ) |
SPI bus object used by the IMU driver.
| DevLab_ICM20948 imu |
Global ICM-20948 driver instance.
Definition at line 45 of file spi_magneto.ino.