Skip to main content

Servo

Servo motors rotate to specific angles or pulse widths, which makes them useful for steering, arms, and simple mechanisms.

Attach servo motor

Attach a servo to a digital pin.

Attach servo motor (advanced)

Attach a servo with a custom pulse-width range.

Detach servo motor

Release the servo so the pin can be reused.

Set servo motor angle

Move the servo to a target angle.

Set servo motor pulse width

Drive the servo using a specific pulse width in microseconds.

Read servo motor angle

Read the last angle that was written to the servo.