MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4Motion Class Reference

Class for motion sensing using an IMU (Inertial Measurement Unit). More...

#include <MiniR4Motion.h>

Public Types

enum class  AxisType {
  X , Y , Z , Roll ,
  Pitch , Yaw
}
 

Public Member Functions

 MiniR4Motion ()
 
double getGyro (AxisType axis)
 Gets the gyro value for a specified axis.
 
double getAccel (AxisType axis)
 Gets the accelerometer value for a specified axis.
 
int16_t getEuler (AxisType axis)
 Gets the Euler angle for a specified axis.
 
bool resetIMUValues (void)
 Resets the IMU values to zero.
 

Detailed Description

Class for motion sensing using an IMU (Inertial Measurement Unit).

Note: This Class is for Controller built-in IMU (PU6050) control by Lower MCU (STM32)

This class provides methods to retrieve gyro, accelerometer, and Euler angles data from the IMU. It also allows resetting the IMU values to zero.

Definition at line 19 of file MiniR4Motion.h.

Member Enumeration Documentation

◆ AxisType

enum class MiniR4Motion::AxisType
strong
Enumerator
Roll 
Pitch 
Yaw 

Definition at line 24 of file MiniR4Motion.h.

Constructor & Destructor Documentation

◆ MiniR4Motion()

MiniR4Motion::MiniR4Motion ( )
inline

Definition at line 22 of file MiniR4Motion.h.

Member Function Documentation

◆ getAccel()

double MiniR4Motion::getAccel ( AxisType axis)
inline

Gets the accelerometer value for a specified axis.

Parameters
axisThe axis for which to retrieve the accelerometer value (X, Y, Z).
Returns
The accelerometer value for the specified axis.

Definition at line 61 of file MiniR4Motion.h.

◆ getEuler()

int16_t MiniR4Motion::getEuler ( AxisType axis)
inline

Gets the Euler angle for a specified axis.

Parameters
axisThe axis for which to retrieve the Euler angle (Roll, Pitch, Yaw).
Returns
The Euler angle for the specified axis.

Definition at line 82 of file MiniR4Motion.h.

◆ getGyro()

double MiniR4Motion::getGyro ( AxisType axis)
inline

Gets the gyro value for a specified axis.

Parameters
axisThe axis for which to retrieve the gyro value (X, Y, Z).
Returns
The gyro value for the specified axis.

Definition at line 40 of file MiniR4Motion.h.

◆ resetIMUValues()

bool MiniR4Motion::resetIMUValues ( void )
inline

Resets the IMU values to zero.

Returns
True if the reset operation was successful, false otherwise.

Definition at line 102 of file MiniR4Motion.h.


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