![]()  | 
  
    MatrixMiniR4 1.1.9
    
   Matrix Mini R4 Arduino Library API Documentation 
   | 
 
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 () | |
| bool | begin (void) | 
| double | getGyro (AxisType axis) | 
| Gets the gyro value for a specified axis.   | |
| double | getAccel (AxisType axis) | 
| Gets the accelerometer value for a specified axis.   | |
| double | getAccelRaw (AxisType axis) | 
| Gets the raw (uncalibrated) IMU accelerometer data for a specific axis.   | |
| double | getEuler (AxisType axis) | 
| Gets the Euler angle for a specified axis.   | |
| uint8_t | getAccel_All (double *dataX) | 
| Gets the accelerometer value for a specified axis.   | |
| uint8_t | getGyro_All (double *dataX) | 
| Gets the gyro value for a specified axis.   | |
| uint8_t | getEuler_All (double *dataX) | 
| Gets the Euler angle for a specified axis.   | |
| bool | saveIMUCalData (float face1, float face2, float face3, float face4, float face5, float face6) | 
| Save IMU calibration data with 6 individual parameters (R4 EEPROM 0x32 - 0x49)   | |
| bool | applyIMUCalData (void) | 
| Load and send IMU calibration data from EEPROM (R4 EEPROM 0x32 - 0x49)   | |
| bool | getAllSpeed (int32_t *Speed_value) | 
| Gets the current encoder Speed value. (RPS)   | |
| bool | getIMU_acc_real (float *accdataCX) | 
| Gets the raw (uncalibrated) IMU accelerometer data.   | |
| bool | resetIMUValues (void) | 
| Resets the IMU values to zero.   | |
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 20 of file MiniR4Motion.h.
      
  | 
  strong | 
| Enumerator | |
|---|---|
| X | |
| Y | |
| Z | |
| Roll | |
| Pitch | |
| Yaw | |
Definition at line 25 of file MiniR4Motion.h.
      
  | 
  inline | 
Definition at line 23 of file MiniR4Motion.h.
      
  | 
  inline | 
Load and send IMU calibration data from EEPROM (R4 EEPROM 0x32 - 0x49)
Reads the Six-Position Calibration data from EEPROM and sends it to the STM32 unit.
Definition at line 222 of file MiniR4Motion.h.
      
  | 
  inline | 
Definition at line 35 of file MiniR4Motion.h.
      
  | 
  inline | 
Gets the accelerometer value for a specified axis.
| axis | The axis for which to retrieve the accelerometer value (X, Y, Z). | 
Definition at line 68 of file MiniR4Motion.h.
      
  | 
  inline | 
Gets the accelerometer value for a specified axis.
| axis | The axis for which to retrieve the accelerometer value (X, Y, Z). | 
Definition at line 136 of file MiniR4Motion.h.
      
  | 
  inline | 
Gets the raw (uncalibrated) IMU accelerometer data for a specific axis.
Reads the uncalibrated accelerometer value for the specified axis (X, Y, or Z).
| axis | The axis to read (AxisType::X, AxisType::Y, or AxisType::Z) | 
Definition at line 91 of file MiniR4Motion.h.
      
  | 
  inline | 
Gets the current encoder Speed value. (RPS)
Definition at line 248 of file MiniR4Motion.h.
      
  | 
  inline | 
Gets the Euler angle for a specified axis.
| axis | The axis for which to retrieve the Euler angle (Roll, Pitch, Yaw). | 
Definition at line 115 of file MiniR4Motion.h.
      
  | 
  inline | 
Gets the Euler angle for a specified axis.
| axis | The axis for which to retrieve the Euler angle (Roll, Pitch, Yaw). | 
Definition at line 171 of file MiniR4Motion.h.
      
  | 
  inline | 
Gets the gyro value for a specified axis.
| axis | The axis for which to retrieve the gyro value (X, Y, Z). | 
Definition at line 47 of file MiniR4Motion.h.
      
  | 
  inline | 
Gets the gyro value for a specified axis.
| axis | The axis for which to retrieve the gyro value (X, Y, Z). | 
Definition at line 154 of file MiniR4Motion.h.
      
  | 
  inline | 
Gets the raw (uncalibrated) IMU accelerometer data.
Reads the 3-axis accelerometer values without calibration applied. Performs two consecutive reads with a 2ms delay for stability.
| accdataCX | Pointer to float array to store the accelerometer data (X, Y, Z axes) | 
Definition at line 271 of file MiniR4Motion.h.
      
  | 
  inline | 
Resets the IMU values to zero.
Definition at line 290 of file MiniR4Motion.h.
      
  | 
  inline | 
Save IMU calibration data with 6 individual parameters (R4 EEPROM 0x32 - 0x49)
| face1 | Calibration value for face 1 | 
| face2 | Calibration value for face 2 | 
| face3 | Calibration value for face 3 | 
| face4 | Calibration value for face 4 | 
| face5 | Calibration value for face 5 | 
| face6 | Calibration value for face 6 | 
Definition at line 194 of file MiniR4Motion.h.