# BMI270 Sensor Component for ESP-IDF
High-performance BMI270 6-axis IMU sensor driver with advanced gesture recognition support for ESP32 series chips.
## Features
### Core Capabilities
- **Full 6-axis IMU**: 3-axis accelerometer + 3-axis gyroscope
- **AUX I2C Interface**: Access external sensors (e.g. BMM150 magnetometer) via `bmi270_aux_*` APIs
- **Multiple Firmware Variants**: Base, Circle, Toy
- **I2C Interface**: Flexible communication protocols
- **Interrupt Support**: Hardware interrupt-driven event detection
- **Low Power**: Advanced power management modes
### AUX Magnetometer (e.g. BMM150)
```c
bmi270_aux_config_t aux_cfg = {
.aux_en = BMI2_ENABLE,
.manual_en = BMI2_ENABLE,
.fcu_write_en = BMI2_DISABLE,
.man_rd_burst = BMI2_AUX_READ_LEN_1,
.aux_rd_burst = BMI2_AUX_READ_LEN_1,
.odr = BMI2_AUX_ODR_100HZ,
.offset = 0,
.i2c_device_addr = 0x10, /* BMM150 default */
.read_addr = 0x40, /* BMM150 CHIP_ID */
};
bmi270_aux_set_config(bmi_handle, &aux_cfg);
/* Manual-mode register access, or pass bmi270_get_dev(bmi_handle) to an AUX adapter */
uint8_t chip_id = 0;
bmi270_aux_read(bmi_handle, 0x40, &chip_id, 1);
```
### Advanced Gesture Detection
#### Circle Gesture (BMI270 Circle)
- Clockwise/counter-clockwise motion detection
- Multi-axis support (X/Y/Z rotation)
- Configurable sensitivity thresholds
#### Toy Motion (BMI270 Toy)
- Pick-up/put-down detection
- Throw gestures (up/down/catch)
- Push and shake detection
- Rolling orientation tracking
- Rotation angle measurement
#### Standard Features (BMI270 Base/Legacy)
- Any/no motion detection
- Tap detection (single/double/triple)
- Step counter & activity recognition
- Wrist gestures & orientation
## Examples
Complete examples available in `components/bmi270_sensor/examples/`:
- `any_motion` - Motion detection with interrupts
- `circle_gesture` - Circular motion recognition
- `multi_tap` - Tap gesture detection (single/double/triple)
- `push_in_air` - Push gesture in air detection
- `push_on_table` - Push gesture on table detection
- `rolling` - Device orientation tracking
- `rotation` - Rotation angle measurement
- `shake` - Shake gesture detection
- `toy_motion` - Comprehensive toy motion gestures
## Sensor Documentation
Full sensor reference: [Bosch BMI270 Product Page](https://www.bosch-sensortec.com/products/motion-sensors/imus/bmi270.html)
idf.py add-dependency "espressif/bmi270_sensor^0.2.1"