Emakefun MPU-6050 1.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
Mpu6050 Class Reference

Classes

struct  Acceleration
 Acceleration in x, y, and z directions. More...
 
struct  Euler
 Euler angles (yaw, pitch, and roll). More...
 

Public Types

enum  : uint8_t { kDefaultDeviceI2cAddress = 0x68 }
 Default I2C device address for the MPU6050.
 

Public Member Functions

 Mpu6050 (uint8_t device_i2c_address=kDefaultDeviceI2cAddress)
 Constructor.
 
bool Setup ()
 Sets up the MPU6050.
 
bool UpdateMotionInfo ()
 Updates information from fifo data of mpu6050.
 
Euler GetEuler () const
 Gets the Euler angles.
 
Acceleration GetAcceleration () const
 Gets the acceleration values.
 

Detailed Description

Examples
get_acceleration.ino, and get_euler.ino.

Constructor & Destructor Documentation

◆ Mpu6050()

Mpu6050::Mpu6050 ( uint8_t  device_i2c_address = kDefaultDeviceI2cAddress)
explicit

Constructor.

Parameters
device_i2c_addressThe I2C device address for the MPU6050.

Member Function Documentation

◆ GetAcceleration()

Mpu6050::Acceleration Mpu6050::GetAcceleration ( ) const

Gets the acceleration values.

Returns
Acceleration in x, y, and z directions.

◆ GetEuler()

Mpu6050::Euler Mpu6050::GetEuler ( ) const

Gets the Euler angles.

Returns
Euler angles (yaw, pitch, and roll).

◆ Setup()

bool Mpu6050::Setup ( )

Sets up the MPU6050.

Returns
true if setup is successful, false otherwise.

◆ UpdateMotionInfo()

bool Mpu6050::UpdateMotionInfo ( )

Updates information from fifo data of mpu6050.

Returns
true if the update is successful, false otherwise.

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