generated from sirlilpanda/kicad-project-template-actionless
Added exmaple code of lsm6do to quickly test imu
This commit is contained in:
50
software/lsm6dso_example/README.md
Normal file
50
software/lsm6dso_example/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# LSM6DSO Example
|
||||
|
||||
This example demonstrates how to use the espp LSM6DSO 6-axis IMU driver with the
|
||||
ESP-IDF. The example is modeled after the ICM42607 example and shows how to
|
||||
configure the IMU, read accelerometer and gyroscope data, and use orientation
|
||||
filtering (e.g., Madgwick filter).
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
- I2C communication with the LSM6DSO
|
||||
- Configurable accelerometer and gyroscope range and output data rate
|
||||
- Periodic reading of accelerometer, gyroscope, and temperature data
|
||||
- Orientation filtering using Madgwick filter
|
||||
|
||||
## Usage
|
||||
- Configure the I2C pins and address in `sdkconfig` or via Kconfig options
|
||||
- Build and flash the example to your ESP32/ESP-IDF target
|
||||
- The example will print IMU data and orientation to the serial console
|
||||
|
||||
### Build and Flash
|
||||
|
||||
Build the project and flash it to the board, then run monitor tool to view
|
||||
serial output:
|
||||
|
||||
```
|
||||
idf.py -p PORT flash monitor
|
||||
```
|
||||
|
||||
(Replace PORT with the name of the serial port to use.)
|
||||
|
||||
(To exit the serial monitor, type ``Ctrl-]``.)
|
||||
|
||||
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
|
||||
|
||||
## Example Output
|
||||
|
||||

|
||||

|
||||
|
||||
## Example Code
|
||||
See `main/lsm6dso_example.cpp` for the full example source code.
|
||||
|
||||
## Configuration
|
||||
- Default I2C address: 0x6A (can be changed in Kconfig or via config struct)
|
||||
- Example I2C pins: SDA = 21, SCL = 22
|
||||
|
||||
## Documentation
|
||||
See the [documentation](https://esp-cpp.github.io/espp/imu/lsm6dso.html) for
|
||||
full API details.
|
||||
Reference in New Issue
Block a user