Skip to content

tvlad1234/MPU6050-Cube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

MPU6050-Cube

MPU6050 Library for STM32Cube
Based on Adafruit MPU6050

Initializing the sensor

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);

Reading the sensor

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

Configuring the sensor

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)

Releases

No releases published

Packages

No packages published

Languages