Class that manage the MPU6050 3-axes accelerometer/gyrometer.
More...
#include <mpu6050.h>
|
|
void | init_mpu () |
| | initialise the MPU configuration
|
| |
| struct_I2CXferResult | read_registers_all_raw_data () |
| | fill the internal data with raw values from sensors
|
| |
|
void | calibrate () |
| | start the calibration of the MPU and compute gyro and accellero offset and conversion factor
|
| |
|
void | convert_raw_to_measure () |
| | fill the internal measures by converting the raw data
|
| |
|
void | read_FIFO_g_accel_raw_data () |
| | read raw acceleration and gyrometer data from FIFO
|
| |
|
void | read_FIFO_accel_raw_data () |
| | read raw acceleration data from FIFO
|
| |
|
|
HW_I2C_Master * | master |
| | the I2C master that control the MPU6050 device
|
| |
|
struct_ConfigMPU6050 | device_config |
| | the MPU6050 configuration
|
| |
|
float | acceleration_factor {} |
| | the accelerator proportional factor computed according to the device configuration
|
| |
|
float | gyro_factor {} |
| | the gyrometer proportional factor computed according to the device configuration
|
| |
|
float | temperature_gain = 1.0 / 340.0 |
| | the proportional factor for the temperature
|
| |
|
float | temperature_offset = 36.53 |
| | the temperature offset
|
| |
|
float | accel_x_offset {} |
| | the x-acceleration offset
|
| |
|
float | accel_y_offset {} |
| | the y-acceleration offset
|
| |
|
float | accel_z_offset {} |
| | the z-acceleration offset
|
| |
|
float | gyro_x_offset {} |
| | the x-gyrometer offset
|
| |
|
float | gyro_y_offset {} |
| | the y-gyrometer offset
|
| |
|
float | gyro_z_offset {} |
| | the z-gyrometer offset
|
| |
Class that manage the MPU6050 3-axes accelerometer/gyrometer.
- Note
- I2C signals are very sensitive. May not work properly when wiring is not clean
◆ MPU6050()
Construct a new MPU6050 object.
- Parameters
-
| master | The associated I2C bus master |
| default_config | the default config according to struct_ConfigMPU6050 |
◆ get_FIFO_count()
| uint16_t MPU6050::get_FIFO_count |
( |
| ) |
|
Get the FIFO count object.
- Returns
- uint16_t
◆ get_measures()
Get the raw data, fill the internal struct_RawData, converts raw data to real measures according to offset and coversion factor.
- Returns
- struct_MPUData
◆ get_MPU_temperature()
| float MPU6050::get_MPU_temperature |
( |
| ) |
|
Get the MPU temperature object.
- Returns
- float
◆ is_data_ready()
| bool MPU6050::is_data_ready |
( |
| ) |
|
the flag that indicates if sensors data are ready
- Returns
- true
-
false
◆ read_FIFO_all_raw_data()
| void MPU6050::read_FIFO_all_raw_data |
( |
| ) |
|
read raw data from FIFO
- Bug
- //FIXME : check FIFO data reading.... seems not working well
◆ read_registers_all_raw_data()
fill the internal data with raw values from sensors
- Returns
- struct_I2CXferResult The result of the i2c reading
The documentation for this class was generated from the following files: