|
@@ -40,6 +40,8 @@
|
40
|
40
|
readMicroseconds() - Gets the last written servo pulse width in microseconds. (was read_us() in first release)
|
41
|
41
|
attached() - Returns true if there is a servo attached.
|
42
|
42
|
detach() - Stops an attached servos from pulsing its i/o pin.
|
|
43
|
+ move(pin, angel) - Sequence of attach(pin), write(angel),
|
|
44
|
+ if DEACTIVATE_SERVOS_AFTER_MOVE is defined waits SERVO_DEACTIVATION_DELAY, than detaches.
|
43
|
45
|
*/
|
44
|
46
|
|
45
|
47
|
#ifndef servo_h
|
|
@@ -120,6 +122,9 @@ class Servo {
|
120
|
122
|
void detach();
|
121
|
123
|
void write(int value); // if value is < 200 it is treated as an angle, otherwise as pulse width in microseconds
|
122
|
124
|
void writeMicroseconds(int value); // Write pulse width in microseconds
|
|
125
|
+ uint8_t move(int pin, int value); // attach the given pin to the next free channel, sets pinMode, returns channel number or 0 if failure.
|
|
126
|
+ // if value is < 200 it is treated as an angle, otherwise as pulse width in microseconds.
|
|
127
|
+ // if DEACTIVATE_SERVOS_AFTER_MOVE is defined waits SERVO_DEACTIVATION_DELAY, than detaches.
|
123
|
128
|
int read(); // returns current pulse width as an angle between 0 and 180 degrees
|
124
|
129
|
int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release)
|
125
|
130
|
bool attached(); // return true if this servo is attached, otherwise false
|