https://github.com/cybergear-robotics/icm20948
ESP-IDF library for IMU ICM-20948 with support for SPI, I2C and InvenSense Digital Motion Processor
https://github.com/cybergear-robotics/icm20948
dmp esp-idf esp32 i2c icm20948 imu spi
Last synced: 7 months ago
JSON representation
ESP-IDF library for IMU ICM-20948 with support for SPI, I2C and InvenSense Digital Motion Processor
- Host: GitHub
- URL: https://github.com/cybergear-robotics/icm20948
- Owner: cybergear-robotics
- License: mit
- Created: 2025-01-09T09:47:30.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-01-23T10:19:01.000Z (9 months ago)
- Last Synced: 2025-01-23T11:26:25.762Z (9 months ago)
- Topics: dmp, esp-idf, esp32, i2c, icm20948, imu, spi
- Language: C
- Homepage:
- Size: 135 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ICM-20948 component for ESP-IDF
[](https://github.com/cybergear-robotics/icm20948/actions/workflows/build_example.yml)
[](https://opensource.org/licenses/MIT)
[](https://GitHub.com/Naereen/cybergear-robotics/icm20948/commit-activity)
[](https://shields.io/)
[](https://shields.io/)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](https://github.com/sparkfun/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](docs/DMP.md).
## Supported Features
* I2C
* SPI
* DMP## Using component
```bash
idf.py add-dependency "cybergear-robotics/icm20948"
```## Example
Not all examples are ported. For further examples, please look at the original project.1. create example project
```bash
idf.py create-project-from-example "cybergear-robotics/icm20948:i2c_agmt"
```
2. Go to to example directory (for example `spi_agmt`)
`cd spi_agmt`
3. Set ESP chip
`idf.py set-target esp32`
4. Configure ICM-20948 settings
`idf.py menuconfig` and go to `ICM-20948 Example`
5. Build, flash
`idf.py build flash monitor`## DMP Support
DMP support can be enabled in menuconfig "ICM-20948 Settings". An example is provided in `examples/spi_dmp_quad9_orientation`.
## Related projects
| Project | Framework | I2C | SPI | DMP |
| :---: | :---: | :---: | :---: | :---: |
| [SparkFun_ICM-20948_ArduinoLibrary](https://github.com/sparkfun/SparkFun_ICM-20948_ArduinoLibrary) | Arduino | ✓| ✓| ✓|
| [hellvesper/icm20948-i2c](https://github.com/hellvesper/icm20948-i2c) | ESP-IDF | ✓| | ✓|
| [wollewald/ICM20948_WE](https://github.com/wollewald/ICM20948_WE) | Arduino | ✓| ✓| |
| [isouriadakis/Arduino_ICM20948_DMP_Full-Function](https://github.com/isouriadakis/Arduino_ICM20948_DMP_Full-Function) | Arduino | ✓| ✓| ✓|