MPU6050 Library for STM32Cube
Based on Adafruit MPU6050
Before reading the sensor, it must be initialized with mpuBegin.
mpuBegin takes a pointer to the I2C Handler and returns 1 if connection was successful.
Example: mpuBegin(&hi2c1);
readMPUAccel(float *gx, float *gy, float *gz)
provides the acceleration in m/s^2
readMPUGyro(float *gx, float *gy, float *gz)
provides the angular velocity in deg/s
The sensor can be configured using the following functions:
setMPUFilterBandwidth(mpu6050_bandwidth_t bw)
setMPUAccelRange(mpu6050_accel_range_t accel_range)
setMPUGyroRange(mpu6050_gyro_range_t gyro_range)