17 SmartMotor(
byte pwm,
byte dir,
byte enc_a,
byte enc_b,
bool invert =
false, PIO pio = pio0);
28 int speedToPower(
float speed);
36 unsigned long enc_last;
37 unsigned long pid_last;
Motor class used to control simple DC motors.
Definition Motor.h:10
PID controller library.
Definition PID.h:9
Class used to control DC motors at a constant speed.
Definition SmartMotor.h:15
void stop()
Stop the motor.
Definition SmartMotor.cpp:67
void update()
Update routine, updating the PID and the motor speed.
Definition SmartMotor.cpp:31
float getSpeed()
Get the current speed of the motor.
Definition SmartMotor.cpp:54
void setSpeed(float value)
Set the desired speed of the motor.
Definition SmartMotor.cpp:45
void begin()
Initialize SmartMotor and necessary components.
Definition SmartMotor.cpp:22
void calibrate(float target=45.f)
Calibrate the PID controller.
Definition SmartMotor.cpp:80
Class used to read data from traction rotary encoders.
Definition TractionEncoder.h:13