DevLab_ICM20948 1.0.2 ICM-20948 9-Axis Motion Sensor Driver

Loading...
Searching...
No Matches
Macros | Functions | Variables
spi_basic.ino File Reference
`#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 ()
| Initialize Serial and start the ICM-20948 over SPI.
void | loop ()
| Read and print accelerometer, gyroscope, and temperature data.

## Variables
DevLab_ICM20948 | imu
| Global ICM-20948 driver instance.

## Macro Definition Documentation

## ◆ CS_PIN

#define CS_PIN D10

Chip-select pin for SPI.

Definition at line 35 of file spi_basic.ino.

## ◆ SPI_FAST_SPEED

#define SPI_FAST_SPEED 1000000

SPI clock used during sensor initialization and reads.

Definition at line 38 of file spi_basic.ino.

## Function Documentation

## ◆ loop()

void loop | ( |  | ) |

Read and print accelerometer, gyroscope, and temperature data.

Definition at line 69 of file spi_basic.ino.

Here is the call graph for this function:

## ◆ setup()

void setup | ( |  | ) |

Initialize Serial and start the ICM-20948 over SPI.

Note
  The sketch expects a board-level CS_PIN definition to select the chip-select pin used by beginSPI().

Definition at line 52 of file spi_basic.ino.

Here is the call graph for this function:

## ◆ spi_bus()

SPIClass spi_bus | ( | SPI |  | ) |

SPI bus object used by the IMU driver.

Here is the caller graph for this function:

## Variable Documentation

## ◆ imu

DevLab_ICM20948 imu

Global ICM-20948 driver instance.

Definition at line 41 of file spi_basic.ino.