ServoKit.ServoController (servo_kit v0.0.8) View Source
Wraps a servo module and controls a servo using that module. The servo state will be kept in a process.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Delegates the specified operation to the servo driver, and updates the servo state as needed.
Starts a servo driver process.
Discovers a servo process by servo module name.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Delegates the specified operation to the servo driver, and updates the servo state as needed.
ServoKit.ServoController.run_command(pid, {:set_angle, [0, 180]})
Starts a servo driver process.
driver = ServoKit.PCA9685.new()
{:ok, pid} = ServoKit.ServoController.start_link(ServoKit.StandardServo, [driver, %{}])
Discovers a servo process by servo module name.