HRI board firmware  v2.1
Microcontroller firmware of the board used during the HRI labs.
Enumerations | Functions
mpu_6050.h File Reference
#include "../main.h"

Go to the source code of this file.

Enumerations

enum  mpu_AccelRange { MPU_ACCEL_RANGE_2G = 0, MPU_ACCEL_RANGE_4G = 1, MPU_ACCEL_RANGE_8G = 2, MPU_ACCEL_RANGE_16G = 3 }
 Enumeration of the possible accelerometer ranges. More...
 
enum  mpu_GyroRange { MPU_GYRO_RANGE_250DPS = 0, MPU_GYRO_RANGE_500DPS = 1, MPU_GYRO_RANGE_1000DPS = 2, MPU_GYRO_RANGE_2000DPS = 3 }
 Enumeration of the possible gyrometer ranges. More...
 
enum  mpu_Bandwidth {
  MPU_DLPF_BW_256HZ = 0, MPU_DLPF_BW_188HZ = 1, MPU_DLPF_BW_98HZ = 2, MPU_DLPF_BW_42HZ = 3,
  MPU_DLPF_BW_20HZ = 4, MPU_DLPF_BW_10HZ = 5, MPU_DLPF_BW_5HZ = 6
}
 Enumeration of the possible bandwidths. More...
 
enum  mpu_Axis {
  MPU_AXIS_ACCEL_X = 0x3b, MPU_AXIS_ACCEL_Y = 0x3d, MPU_AXIS_ACCEL_Z = 0x3f, MPU_AXIS_TEMPERATURE = 0x41,
  MPU_AXIS_GYRO_X = 0x43, MPU_AXIS_GYRO_Y = 0x45, MPU_AXIS_GYRO_Z = 0x47
}
 Enumeration of all the measurement registers. More...
 

Functions

bool mpu_Init (mpu_AccelRange accelRange, mpu_GyroRange gyroRange, mpu_Bandwidth bandwidth)
 Initializes the MPU-6050 device. More...
 
void mpu_GetAxis (mpu_Axis axis, float32_t *value)
 Acquires the value of a single axis, from the IMU. More...
 
void mpu_GetAcceleration (float32_t *ax, float32_t *ay, float32_t *az)
 Acquires the acceleration from the IMU. More...
 
void mpu_GetAngularSpeed (float32_t *gx, float32_t *gy, float32_t *gz)
 Acquires the angular speed from the IMU. More...
 
float mpu_GetTemperature (void)
 Acquires the temperature from the IMU. More...