Module for the MPU6050 IMU sensor.
More...
|
| IMU Filter |
| Digital filtering data structures and functions, for IMU data.
|
|
|
Module for the MPU6050 IMU sensor.
◆ Fill_Struct()
void MPU6050::Fill_Struct |
( |
IMUStruct * |
myStruct | ) |
|
Fills an IMUStruct.
- Parameters
-
myStruct | The pointer to the struct being filled |
- Returns
- None
Definition at line 302 of file MPU6050.cpp.
◆ init()
void MPU6050::init |
( |
uint8_t |
lpf | ) |
|
This function is used to initialize all aspects of the IMU which require I/O.
- Parameters
-
lpf | The uint8_t lpf setting being used |
- Returns
- None
Definition at line 209 of file MPU6050.cpp.
◆ MPU6050()
MPU6050::MPU6050 |
( |
int |
SensorNum, |
|
|
I2C_HandleTypeDef * |
I2CHandle |
|
) |
| |
The constructor for the MPU6050 class, which initializes non-I/O members.
- Parameters
-
SensorNum | The integer ID of the sensor being used |
I2CHandle | A pointer to the I2C_HandleTypeDef being used |
- Returns
- None
Definition at line 188 of file MPU6050.cpp.
◆ Read_Accelerometer_Withoffset()
void MPU6050::Read_Accelerometer_Withoffset |
( |
| ) |
|
Reads the accelerometer with offsets without interrupts.
- Parameters
-
- Returns
- None
Definition at line 262 of file MPU6050.cpp.
◆ Read_Accelerometer_Withoffset_IT()
void MPU6050::Read_Accelerometer_Withoffset_IT |
( |
| ) |
|
Reads the accelerometer with interrupts and offsets.
- Parameters
-
- Returns
- None
Definition at line 274 of file MPU6050.cpp.
◆ Read_Data()
uint8_t MPU6050::Read_Data |
( |
uint8_t |
Reg_addr, |
|
|
uint8_t * |
sensor_buffer |
|
) |
| |
|
private |
Reads 6 bytes from the sensor, and stores them in the sensor_buffer.
- Parameters
-
reg_addr | uint8_t address of the register |
sensor_buffer | uint8_t pointer to output buffer |
- Returns
- Status
Definition at line 350 of file MPU6050.cpp.
◆ Read_Data_IT()
BaseType_t MPU6050::Read_Data_IT |
( |
uint8_t |
Reg_addr, |
|
|
uint8_t * |
sensor_buffer |
|
) |
| |
|
private |
Reads 6 bytes from the sensor with interrupts, and stores them in the sensor_buffer.
- Parameters
-
reg_addr | uint8_t address of the register |
sensor_buffer | uint8_t pointer to output buffer |
- Returns
- Status
Definition at line 339 of file MPU6050.cpp.
◆ Read_Gyroscope_Withoffset()
void MPU6050::Read_Gyroscope_Withoffset |
( |
| ) |
|
Reads the gyroscope with offsets without interrupts.
- Parameters
-
- Returns
- None
Definition at line 220 of file MPU6050.cpp.
◆ Read_Gyroscope_Withoffset_IT()
void MPU6050::Read_Gyroscope_Withoffset_IT |
( |
| ) |
|
Reads the gyroscope with interrupts and offsets.
- Parameters
-
- Returns
- None
Definition at line 232 of file MPU6050.cpp.
◆ Read_Reg()
uint8_t MPU6050::Read_Reg |
( |
uint8_t |
reg_addr | ) |
|
|
private |
Reads a byte from a register on the sensor, and stores it in the member variable received_byte.
- Parameters
-
reg_addr | uint8_t address of the register |
- Returns
- Status
Definition at line 326 of file MPU6050.cpp.
◆ Set_LPF()
int MPU6050::Set_LPF |
( |
uint8_t |
lpf | ) |
|
|
private |
Sets the offsets of the sensor.
- Parameters
-
lpf | The uint8_t setting being used for the built-in LPF |
- Returns
- None
Definition at line 363 of file MPU6050.cpp.
◆ Write_Reg()
int MPU6050::Write_Reg |
( |
uint8_t |
reg_addr, |
|
|
uint8_t |
data |
|
) |
| |
|
private |
Writes to a register from the MPU6050.
- Parameters
-
reg_addr | uint8_t address of the register |
data | uint8_t data to be written |
- Returns
- Status
Definition at line 314 of file MPU6050.cpp.