项目作者: Rad-hi

项目描述 :
This is a driver for the MPU6050 Accelerometer and Gyroscope I²C module.
高级语言: C++
项目地址: git://github.com/Rad-hi/MPU6050_driver.git
创建时间: 2021-08-19T22:42:32Z
项目社区:https://github.com/Rad-hi/MPU6050_driver

开源协议:

下载


MPU6050 Accelerometer and Gyroscope driver

Functionalities

This driver provides functions to

  • Configure the MPU6050 into one of 4 operation modes FULL, FULL WITH ITERRUPTS, ACCELEROMETER ONLY, ACCELEROMETER ONLY WITH INTERRUPTS
  • Retreive data from the MPU6050 module
  • Put the MPU6050 into sleep
  • And since all registers are defined, and a write and a write and read functions are provided to interact with the module, any additional functionality is easy to implement.

How to use

Once the MPU6050 object has been instanciated, it should be setup in one of 4 modes, and two scenarios arise from here:

  • Non interruption operation, where you have 3 reading functions to request data immediately from the MPU6050 module.

  • Interruption operation, where you’ll have to use the i2c_read_with_interrupt function to access the latest available data from the MPU6050 module.

TODO

  • Every sensor needs calibration since no two modules are exactly the same, and they all come with inperfections, a calibration routine must be implemented.

  • DONE ~The read upon interrupt routine hasen’t been implemented yet, although the “put into mode” functionality is ready.~