MPU6050 Driver Component
C driver for Invensense MPU6050 6-axis gyroscope and accelerometer based on I2C communication.
- Get 3-axis accelerometer and 3-axis gyroscope data, either raw or as floating point values.
- Read temperature from MPU6050 internal temperature sensor.
- Configure gyroscope and accelerometer sensitivity.
- MPU6050 power down mode.
- Support for MPU6050 interrupt generation when data ready (occurs each time a write to all sensor data registers has been completed).
- Keep in mind that MPU6050 I2C address depends on the level of its AD0 pin (9) (0x68 when low, 0x69 when high).
- In order to receive MPU6050 interrupts, its INT pin (12) must be conneced to a GPIO on the ESP32.
- Only I2C communication is supported.
- Driver has not been tested with MPU 6000 yet.
- 9-axis support through MPU6050 I2C aux is not supported.
- If MPU6050 interrupts are used, it is recommended to not read data using I2C directly from the ISR.
This driver, along with many other components from this repository, can be used as a package from Espressif's IDF Component Registry. To include this driver in your project, run the following idf.py from the project's root directory:
idf.py add-dependency "espressif/mpu6050^1.1.1"
Another option is to manually create a
idf_component.yml file. You can find more about using .yml files for components from Espressif's documentation.