Description Usage Arguments Value Methods (by class) Examples
Sets the position of a given servo instance.
1 2 3 4 | set_position(x, value)
## S4 method for signature 'Servo'
set_position(x, value)
|
x |
A Servo instance. |
value |
A numeric of length one. The new position of the servo as a value between -1 (the minimum position) and +1 (the maximum position). |
The same Servo instance provided as input.
Servo
:
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# Get a servo instance.
servo <- get_servo(14)
# Move the servo to its maximum position.
set_position(servo, 1)
# Move the servo to its minimum position.
set_position(servo, -1)
# Move the servo to its medium position.
set_position(servo, 0)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.