MatrixMiniR4 1.1.4
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MatrixMotion Class Reference

Class for motion sensing using a Matrix Motion sensor. More...

#include <MiniR4MotionExt.h>

Public Member Functions

bool begin ()
 Initializes the MatrixMotion sensor.
 
int getRoll ()
 Gets the roll angle from the motion sensor.
 
int getPitch ()
 Gets the pitch angle from the motion sensor.
 
int getYaw ()
 Gets the yaw angle from the motion sensor.
 
int getGyro (AxisType axis)
 Gets the gyro value for a specified axis.
 
int getAccel (AxisType axis)
 Gets the accelerometer value for a specified axis.
 

Public Attributes

int8_t _ch = 0
 
TwoWire * _pWire
 

Detailed Description

Class for motion sensing using a Matrix Motion sensor.

Note: This Class is for Matrix Motion Sensor (LSM6DS3)

This class provides methods to retrieve roll, pitch, yaw, gyro, and accelerometer data from the motion sensor over I2C.

Definition at line 33 of file MiniR4MotionExt.h.

Member Function Documentation

◆ begin()

bool MatrixMotion::begin ( )

Initializes the MatrixMotion sensor.

Returns
True if the initialization was successful, false otherwise.

Definition at line 9 of file MiniR4MotionExt.cpp.

◆ getAccel()

int MatrixMotion::getAccel ( AxisType axis)

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 58 of file MiniR4MotionExt.cpp.

◆ getGyro()

int MatrixMotion::getGyro ( AxisType axis)

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 45 of file MiniR4MotionExt.cpp.

◆ getPitch()

int MatrixMotion::getPitch ( )

Gets the pitch angle from the motion sensor.

Returns
The pitch angle in degrees.

Definition at line 31 of file MiniR4MotionExt.cpp.

◆ getRoll()

int MatrixMotion::getRoll ( )

Gets the roll angle from the motion sensor.

Returns
The roll angle in degrees.

Definition at line 24 of file MiniR4MotionExt.cpp.

◆ getYaw()

int MatrixMotion::getYaw ( )

Gets the yaw angle from the motion sensor.

Returns
The yaw angle in degrees.

Definition at line 38 of file MiniR4MotionExt.cpp.

Member Data Documentation

◆ _ch

int8_t MatrixMotion::_ch = 0

Definition at line 65 of file MiniR4MotionExt.h.

◆ _pWire

TwoWire* MatrixMotion::_pWire

Definition at line 66 of file MiniR4MotionExt.h.


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