JMotor
|
defines interface for servo driver with variable frequency, subclass of JMotorDriverServo and JMotorDriver More...
#include <JMotorDriverServoAdvanced.h>
Public Member Functions | |
virtual void | adjustFrequency (float freq)=0 |
adjust frequency as a fraction of standard 50hz frequency lower frequencies (try .75) may let you reduce how strongly the servo holds its position | |
Public Member Functions inherited from JMotorDriverServo | |
void | setMinServoValue (int value) |
microseconds for shortest servo pulse | |
void | setMaxServoValue (int value) |
microseconds for longest servo pulse | |
int | getMinServoValue () |
returns setting for microseconds for shortest servo pulse | |
int | getMaxServoValue () |
returns setting for microseconds for longest servo pulse | |
int | getServoValueRange () |
returns difference (in microseconds) between longest and shortest servo pulse settings | |
void | setServoValues (int min, int max) |
set the settings for short and long servo pulses at the same time | |
int | getSetMicroseconds () |
returns how many microseconds the servo signal pulse was most recently set to | |
bool | getConstrainRange () |
returns whether the range of set() will be constrained to within -1 and 1 | |
void | setConstrainRange (bool _constrainRange) |
set whether the range of set() will be constrained to within -1 and 1 | |
Public Member Functions inherited from JMotorDriver | |
virtual bool | set (float val) |
set motor power | |
virtual bool | setEnable (bool _enable) |
use to enable or disable a motor, and sets up pin states | |
virtual bool | getEnable () |
get the enable state of the driver | |
virtual float | getMaxRange () |
high end of the range | |
virtual float | getMinRange () |
low end of the range | |
bool | enable () |
enable motor | |
bool | disable () |
disable motor | |
Additional Inherited Members | |
Protected Attributes inherited from JMotorDriverServo | |
int | minServoValue |
int | maxServoValue |
int | setMicroseconds = 0 |
bool | constrainRange |
defines interface for servo driver with variable frequency, subclass of JMotorDriverServo and JMotorDriver
|
pure virtual |
adjust frequency as a fraction of standard 50hz frequency lower frequencies (try .75) may let you reduce how strongly the servo holds its position
freq | (float) freq*50=setFrequency |
Implemented in JMotorDriverServoAdvancedDual, and JMotorDriverEsp32Servo.