C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
MPU6050 Class Reference

Class that manage the MPU6050 3-axes accelerometer/gyrometer. More...

#include <mpu6050.h>

Collaboration diagram for MPU6050:
Collaboration graph

Public Member Functions

 MPU6050 (HW_I2C_Master *master, struct_ConfigMPU6050 default_config)
 Construct a new MPU6050 object.
 
uint16_t get_FIFO_count ()
 Get the FIFO count object.
 
float get_MPU_temperature ()
 Get the MPU temperature object.
 
bool is_data_ready ()
 the flag that indicates if sensors data are ready
 
struct_I2CXferResult get_measures ()
 Get the raw data, fill the internal struct_RawData, converts raw data to real measures according to offset and coversion factor.
 
void read_FIFO_all_raw_data ()
 read raw data from FIFO
 

Public Attributes

struct_MPUData data
 the set of measures from sensors
 
struct_RawData raw
 the set of raw data from sensors
 

Detailed Description

Class that manage the MPU6050 3-axes accelerometer/gyrometer.

Note
I2C signals are very sensitive. May not work properly when wiring is not clean

Constructor & Destructor Documentation

◆ MPU6050()

MPU6050::MPU6050 ( HW_I2C_Master * master,
struct_ConfigMPU6050 default_config )

Construct a new MPU6050 object.

Parameters
masterThe associated I2C bus master
default_configthe default config according to struct_ConfigMPU6050

Member Function Documentation

◆ get_FIFO_count()

uint16_t MPU6050::get_FIFO_count ( )

Get the FIFO count object.

Returns
uint16_t

◆ get_measures()

struct_I2CXferResult MPU6050::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

The documentation for this class was generated from the following files: