ServoKit (servo_kit v0.0.8) View Source
A collection of convenience functions to use this library.
Link to this section Summary
Functions
Runs a quick-test program for the Continuous Servo.
Runs a quick-test program for the LED brightness.
Runs a quick-test program for the Standard Servo.
Initializes a continuous servo. For options, see ServoKit.ContinuousServo
documentation.
Initializes a ServoController
.
Initializes a standard servo. For options, see ServoKit.StandardServo
documentation.
Change the angle for a starndard servo.
Change the throttle for a continuous servo.
Link to this section Functions
Runs a quick-test program for the Continuous Servo.
ServoKit.hello_continuous_servo(8)
Runs a quick-test program for the LED brightness.
ServoKit.hello_led(15)
Runs a quick-test program for the Standard Servo.
ServoKit.hello_standard_servo(0)
Initializes a continuous servo. For options, see ServoKit.ContinuousServo
documentation.
pid = ServoKit.init_continuous_servo()
Initializes a ServoController
.
pid = ServoKit.init_servo_controller(
driver_module: ServoKit.PCA9685,
driver_options: %{},
servo_module: ServoKit.StandardServo,
servo_options: %{}
)
Initializes a standard servo. For options, see ServoKit.StandardServo
documentation.
pid = ServoKit.init_standard_servo()
Change the angle for a starndard servo.
# Set the angle to 90 degrees for Channel 0.
ServoKit.set_angle(pid, 0, 90)
Change the throttle for a continuous servo.
# Set the throttle to full speed reverse for Channel 8.
ServoKit.set_throttle(pid, 8, -1)