espressif/mpu6050

uploaded 2 weeks ago
I2C driver for MPU6050 6-axis gyroscope and accelerometer

readme

MPU6050 Driver Component

Component Registry

C driver for Invensense MPU6050 6-axis gyroscope and accelerometer based on I2C communication.

Features

  • 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).

Important Notes

  • 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.

Limitations

  • 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.

Get Started

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.

See Also

Links:

Supports all targets

License: Apache-2.0

To add this component to your project, run:

idf.py add-dependency "espressif/mpu6050^1.2.0"

or download archive

Dependencies

  • ESP-IDF >=4.0
  • Badge

    espressif/mpu6050 version: 1.2.0