control two JMotorDriverServoAdvanced as if they are one driver
More...
#include <JMotorDriverServoAdvancedDual.h>
control two JMotorDriverServoAdvanced as if they are one driver
- Note
- one (or both) of the drivers may be another dual driver allowing for controlling more than two servos together
◆ JMotorDriverServoAdvancedDual()
◆ adjustFrequency()
void JMotorDriverServoAdvancedDual::adjustFrequency |
( |
float |
freq | ) |
|
|
inlinevirtual |
adjust frequency as a fraction of standard 50hz frequency lower frequencies (try .75) may let you reduce how strongly the servo holds its position
- Note
- different servos may respond differently, possibly including being damaged, so use at your own risk!
- Parameters
-
freq | (float) freq*50=setFrequency |
Implements JMotorDriverServoAdvanced.
◆ getEnable()
bool JMotorDriverServoAdvancedDual::getEnable |
( |
| ) |
|
|
inlinevirtual |
get the enable state of the driver
- Return values
-
(bool) | true if enabled, false if disabled |
Reimplemented from JMotorDriver.
◆ getMaxRange()
float JMotorDriverServoAdvancedDual::getMaxRange |
( |
| ) |
|
|
inlinevirtual |
high end of the range
- Note
- usually 1.0
- Return values
-
Reimplemented from JMotorDriver.
◆ getMaxServoValue()
int JMotorDriverServoAdvancedDual::getMaxServoValue |
( |
| ) |
|
|
inline |
◆ getMinRange()
float JMotorDriverServoAdvancedDual::getMinRange |
( |
| ) |
|
|
inlinevirtual |
low end of the range
- Note
- usually -1.0, if 0, that indicates a motor controller with no reverse function
- Return values
-
Reimplemented from JMotorDriver.
◆ getMinServoValue()
int JMotorDriverServoAdvancedDual::getMinServoValue |
( |
| ) |
|
|
inline |
◆ getServoValueRange()
int JMotorDriverServoAdvancedDual::getServoValueRange |
( |
| ) |
|
|
inline |
◆ set()
bool JMotorDriverServoAdvancedDual::set |
( |
float |
val | ) |
|
|
inlinevirtual |
set motor power
- Note
- val should be between getMinRange and getMaxRange, but constrained internally
- Parameters
-
- Return values
-
(bool) | false if at end of power range, true otherwise |
Reimplemented from JMotorDriver.
◆ setEnable()
bool JMotorDriverServoAdvancedDual::setEnable |
( |
bool |
_enable | ) |
|
|
inlinevirtual |
use to enable or disable a motor, and sets up pin states
- Note
- setEnable(true) must be called before a motor driver will activate
- Parameters
-
_enable | (bool) true=enable, false=disable |
- Return values
-
(bool) | true if state changed, false if state already set |
Reimplemented from JMotorDriver.
◆ setMaxServoValue()
void JMotorDriverServoAdvancedDual::setMaxServoValue |
( |
int |
value | ) |
|
|
inline |
◆ setMinServoValue()
void JMotorDriverServoAdvancedDual::setMinServoValue |
( |
int |
value | ) |
|
|
inline |
◆ setServoValues()
void JMotorDriverServoAdvancedDual::setServoValues |
( |
int |
min, |
|
|
int |
max |
|
) |
| |
|
inline |
◆ m1
◆ m2
The documentation for this class was generated from the following file: