ServoKit.ServoController (servo_kit v0.0.5) 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
Delegates the specified operation to the servo driver, and updates the state as needed.
Returns a specification to start this module under a supervisor.
Starts a servo driver process and registers the process.
Discovers a servo process by servo module name.
Link to this section Functions
Delegates the specified operation to the servo driver, and updates the state as needed.
Examples
ServoKit.ServoController.call(pid, {:set_angle, [0, 180]})
Returns a specification to start this module under a supervisor.
See Supervisor
.
Starts a servo driver process and registers the process.
Examples
driver = ServoKit.PCA9685.new()
{:ok, pid} = ServoKit.ServoController.start_link(ServoKit.StandardServo, [driver, %{}])
Discovers a servo process by servo module name.