|
HRI board firmware
v2.1
Microcontroller firmware of the board used during the HRI labs.
|
Macros | |
| #define | GRAVITY_INTENSITY 9.81f |
| #define | SINT16_MAX_F ((float32_t)SHRT_MAX) |
| #define | SLAVE_ADDRESS 0x68 |
| 0x68 if the AD0 pin is low, 0x69 otherwise. More... | |
| #define | REG_CONFIG 0x1A |
| Configuration register. More... | |
| #define | REG_GYRO_CONFIG 0x1B |
| Gyroscope configuration register. More... | |
| #define | REG_ACCEL_CONFIG 0x1C |
| Accelerometer configuration register. More... | |
| #define | REG_SMPLRT_DIV 0x19 |
| Sample rate divider register. More... | |
| #define | REG_ACCEL_VALUES 0x3b |
| Accelerometer measurements register. More... | |
| #define | REG_TEMP_VALUES 0x41 |
| Temperature measurements register. More... | |
| #define | REG_GYRO_VALUES 0x43 |
| Gyroscope measurements register. More... | |
| #define | REG_SIG_PATH_RST 0x68 |
| Signal path reset register. More... | |
| #define | REG_USER_CTRL 0x6A |
| User control register. More... | |
| #define | REG_POWER_MGMT_1 0x6B |
| Power management 1 register. More... | |
| #define | REG_WHO_AM_I 0x75 |
| Who am I register. More... | |
| #define | WHO_AM_I_VAL 0x68 |
| Expected value of the REG_WHO_AM_I register. 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... | |
| float32_t | mpu_GetTemperature (void) |
| Acquires the temperature from the IMU. More... | |
Variables | |
| const float32_t | MPU_ACCEL_RANGE_REG_TO_CONV_FACTOR [] |
| Gets the actual range value from a mpu_AccelRange enum value. More... | |
| const float32_t | MPU_GYRO_RANGE_REG_TO_CONV_FACTOR [] |
| Gets the actual range value from a mpu_GyroRange enum value. More... | |
| bool | mpu_initialized = false |
| True if the MPU-6050 is initialized, false otherwise. More... | |
| float32_t | accelFactor |
| Converts a raw 16-bit integer value to an acceleration [m/s^2]. More... | |
| float32_t | gyroFactor |
| Converts a raw 16-bit integer value to an angular speed [deg/s]. More... | |
| #define GRAVITY_INTENSITY 9.81f |
| #define REG_ACCEL_CONFIG 0x1C |
Accelerometer configuration register.
| #define REG_ACCEL_VALUES 0x3b |
Accelerometer measurements register.
| #define REG_CONFIG 0x1A |
Configuration register.
| #define REG_GYRO_CONFIG 0x1B |
Gyroscope configuration register.
| #define REG_GYRO_VALUES 0x43 |
Gyroscope measurements register.
| #define REG_POWER_MGMT_1 0x6B |
Power management 1 register.
| #define REG_SIG_PATH_RST 0x68 |
Signal path reset register.
| #define REG_SMPLRT_DIV 0x19 |
Sample rate divider register.
| #define REG_TEMP_VALUES 0x41 |
Temperature measurements register.
| #define REG_USER_CTRL 0x6A |
User control register.
| #define REG_WHO_AM_I 0x75 |
Who am I register.
| #define SINT16_MAX_F ((float32_t)SHRT_MAX) |
| #define SLAVE_ADDRESS 0x68 |
0x68 if the AD0 pin is low, 0x69 otherwise.
| #define WHO_AM_I_VAL 0x68 |
Expected value of the REG_WHO_AM_I register.
| float32_t accelFactor |
Converts a raw 16-bit integer value to an acceleration [m/s^2].
| float32_t gyroFactor |
Converts a raw 16-bit integer value to an angular speed [deg/s].
| const float32_t MPU_ACCEL_RANGE_REG_TO_CONV_FACTOR[] |
Gets the actual range value from a mpu_AccelRange enum value.
| const float32_t MPU_GYRO_RANGE_REG_TO_CONV_FACTOR[] |
Gets the actual range value from a mpu_GyroRange enum value.
| bool mpu_initialized = false |
True if the MPU-6050 is initialized, false otherwise.
1.8.13