This is a modified copy of the SparkFun Arduino library for the TDK InvenSense ICM-20948 Inertial Measurement Unit 9-Degree Of Freedom sensor from SparkFun_ICM-20948_ArduinoLibrary. It bases on the Portable C99 code and uses the I2C and SPI driver of ESP-IDF. The code bases on Version 1.3 of the SparkFun Arduino library and includes support for the InvenSense Digital Motion Processor (DMP™). You can find further details in DMP.md.
- I2C
- SPI
- DMP
idf.py add-dependency "cybergear-robotics/icm20948"Not all examples are ported. For further examples, please look at the original project.
- create example project
idf.py create-project-from-example "cybergear-robotics/icm20948:i2c_agmt"- Go to to example directory (for example
spi_agmt)cd spi_agmt - Set ESP chip
idf.py set-target esp32 - Configure ICM-20948 settings
idf.py menuconfigand go toICM-20948 Example - Build, flash
idf.py build flash monitor
DMP support can be enabled in menuconfig "ICM-20948 Settings". An example is provided in examples/spi_dmp_quad9_orientation.
| Project | Framework | I2C | SPI | DMP |
|---|---|---|---|---|
| SparkFun_ICM-20948_ArduinoLibrary | Arduino | ✓ | ✓ | ✓ |
| hellvesper/icm20948-i2c | ESP-IDF | ✓ | ✓ | |
| wollewald/ICM20948_WE | Arduino | ✓ | ✓ | |
| isouriadakis/Arduino_ICM20948_DMP_Full-Function | Arduino | ✓ | ✓ | ✓ |