RBE1001Lib
Data Structures | Macros | Enumerations | Variables
Motor.h File Reference
#include <ESP32Servo.h>
#include <ESP32Encoder.h>
#include <Arduino.h>
Include dependency graph for Motor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  Motor
 A PID Motor class using FreeRTOS threads, ESP32Encoder and ESP32PWM. More...
 

Macros

#define MAX_POSSIBLE_MOTORS   4
 
#define ENCODER_CPR   12.0f
 
#define GEAR_BOX_RATIO   120.0f
 
#define QUADRATUE_MULTIPLYER   1.0f
 
#define TICKS_TO_DEGREES   ((QUADRATUE_MULTIPLYER / (ENCODER_CPR * GEAR_BOX_RATIO / 360.0)) * -1)
 
#define I_TERM_SIZE   120.0f
 

Enumerations

enum  interpolateMode {
  LINEAR_INTERPOLATION = 1, SINUSOIDAL_INTERPOLATION = 2, VELOCITY_MODE = 3, BEZIER = 4,
  TRAPEZOIDAL = 5
}
 

Variables

const float DELTA_EFFORT = 0.0025
 

Macro Definition Documentation

◆ ENCODER_CPR

#define ENCODER_CPR   12.0f

Definition at line 14 of file Motor.h.

◆ GEAR_BOX_RATIO

#define GEAR_BOX_RATIO   120.0f

Definition at line 15 of file Motor.h.

◆ I_TERM_SIZE

#define I_TERM_SIZE   120.0f

Definition at line 18 of file Motor.h.

Referenced by Motor::loop().

◆ MAX_POSSIBLE_MOTORS

#define MAX_POSSIBLE_MOTORS   4

◆ QUADRATUE_MULTIPLYER

#define QUADRATUE_MULTIPLYER   1.0f

Definition at line 16 of file Motor.h.

◆ TICKS_TO_DEGREES

#define TICKS_TO_DEGREES   ((QUADRATUE_MULTIPLYER / (ENCODER_CPR * GEAR_BOX_RATIO / 360.0)) * -1)

Enumeration Type Documentation

◆ interpolateMode

Enumerator
LINEAR_INTERPOLATION 
SINUSOIDAL_INTERPOLATION 
VELOCITY_MODE 
BEZIER 
TRAPEZOIDAL 

Definition at line 22 of file Motor.h.

Variable Documentation

◆ DELTA_EFFORT

const float DELTA_EFFORT = 0.0025

Definition at line 20 of file Motor.h.

Referenced by Motor::loop().