MPU9150
Driver for MPU9250 I2C accelerometer/gyroscope/magnetometer.
Public Types
Public Attributes
Protected Attributes
Public Functions
Type
Name
MPU9150 (PinName sda, PinName scl)
int
int
update_mag ()
void
set_Ascale (Ascale scale)
void
set_Gscale (Gscale scale)
Protected Functions
Type
Name
void
calibrate ()
Public Types Documentation
enum Ascale
enum MPU9150::Ascale {
AFS_2G = 0,
AFS_4G,
AFS_8G,
AFS_16G,
};
enum Gscale
enum MPU9150::Gscale {
GFS_250DPS = 0,
GFS_500DPS,
GFS_1000DPS,
GFS_2000DPS,
};
Public Attributes Documentation
variable ax
float MPU9150::ax;
variable ay
float MPU9150::ay;
variable az
float MPU9150::az;
variable gx
float MPU9150::gx;
variable gy
float MPU9150::gy;
variable gz
float MPU9150::gz;
variable mx
float MPU9150::mx;
variable my
float MPU9150::my;
variable mz
float MPU9150::mz;
variable t
float MPU9150::t;
Protected Attributes Documentation
variable _Ascale
Ascale MPU9150::_Ascale;
variable _Gscale
Gscale MPU9150::_Gscale;
variable _Gscalings
const float MPU9150::_Gscalings[4];
variable _Ascalings
const float MPU9150::_Ascalings[4];
variable _mpu
I2CWrapper MPU9150::_mpu;
Public Functions Documentation
function MPU9150
MPU9150::MPU9150 (
PinName sda,
PinName scl
)
MPU9150 constructor
Parameters:
sda I2C SDA pin
scl I2C SDL pin
function update_motion
int MPU9150::update_motion ()
Get new data from acc/gyro sensors.
Returns:
0 on success, non-0 on fail
function update_mag
int MPU9150::update_mag ()
Get new data from magnetometer
Returns:
0 on success, non-0 on fail
function set_Ascale
void MPU9150::set_Ascale (
Ascale scale
)
function set_Gscale
void MPU9150::set_Gscale (
Gscale scale
)
Protected Functions Documentation
function calibrate
void MPU9150::calibrate ()
The documentation for this class was generated from the following file: D:/w/hw-libs/\_libs\_/libraries/MPU9150.h
Last updated