ServoKit.StandardServo (servo_kit v0.0.8) View Source

The abstraction of the standard servo.

Link to this section Summary

Types

t()

Configuration options for this module.

Functions

Moves the actuator to the specified angle.

Link to this section Types

Specs

t() :: %ServoKit.StandardServo{
  angle_max: integer(),
  driver: struct(),
  duty_cycle_minmax: {float(), float()}
}

Configuration options for this module.

  • driver: A driver struct.
  • duty_cycle_minmax: A tuple of duty cycle min and max in percent.
  • angle_max: A maximum angle that this servo can move to.

Link to this section Functions

Link to this function

set_angle(state, ch, angle)

View Source

Moves the actuator to the specified angle.

{:ok, state} = ServoKit.StandardServo.set_angle(state, 0, 90)