stop()
Description
Stops a rotating servo. After calling this function, the servo stops at its current position. The set target angle and time are cleared, and the current angle becomes the target angle. This function behaves differently from pause() . You cannot resume the servo using resume() . You must reset the target angle and then call either run() or write() to restart the servo. Note that the servo will still produce force after being stopped. Do not manually rotate it too hard, as this may damage the servo.
Syntax
servo.stop()
Parameters
servo
: A variable of type AIServo
.
Postback
None
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
See also
- attach()
- setPosition()
- pause()
- resume()
Library Reference Home
The text in the 86Duino reference is adapted from the Arduino reference and is licensed under the Creative Commons Attribution-Share Alike 3.0 License. The code examples in the reference materials have been released into the public domain.