1#ifndef J_MOTOR_DRIVER_AVR_SERVO_H
2#define J_MOTOR_DRIVER_AVR_SERVO_H
24 JMotorDriverAvrServo(
byte _servoPin,
int _minServoValue = 544,
int _maxServoValue = 2400,
bool _constrainRange =
true)
36 val = constrain(_val, -1.0, 1.0);
40 if (!motorServo.attached()) {
41 motorServo.attach(servoPin);
46 return abs(_val) < 1.0;
wraps standard servo library. For servos and motor controllers that use servo signals (ESCs)
Definition JMotorDriverAvrServo.h:10
bool setEnable(bool _enable)
use to enable or disable a motor, and sets up pin states
Definition JMotorDriverAvrServo.h:48
JMotorDriverAvrServo(byte _servoPin, int _minServoValue=544, int _maxServoValue=2400, bool _constrainRange=true)
constructor, sets pins
Definition JMotorDriverAvrServo.h:24
bool getEnable()
get the enable state of the driver
Definition JMotorDriverAvrServo.h:66
bool set(float _val)
set motor power
Definition JMotorDriverAvrServo.h:32
float getMaxRange()
high end of the range
Definition JMotorDriverAvrServo.h:70
float getMinRange()
low end of the range
Definition JMotorDriverAvrServo.h:74
class that can be used to specify a driver that controls specifically a servo
Definition JMotorDriverServo.h:8
int maxServoValue
Definition JMotorDriverServo.h:11
bool constrainRange
Definition JMotorDriverServo.h:16
int setMicroseconds
Definition JMotorDriverServo.h:15
int minServoValue
Definition JMotorDriverServo.h:10