setVelocity()
Description
Sets the servo's speed. Note that this function is only valid if the rotation time has not been set. If you have already set the rotation time by calling setPosition(), the speed set by this function will have no effect.
Syntax
servo.setVelocity(value)
Parameters
servo
: A variable of type AIServo
.
value
: The servo's rotational speed, in degrees per second. If the set speed exceeds the servo's limit, the servo will rotate at its maximum speed. If the input value is 0 or 0.0, the servo will rotate at its maximum speed.
Postback
None
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
See also
- attach()
Library Reference Home Page
The text in the 86Duino reference material is modified from the Arduino reference material and is licensed under the Creative Commons Attribution-Share Alike 3.0 License . The code examples in the reference material have been released into the public domain.