Skip to content

Servo — set pulse width [µs] (set_servo_us)

What it does: Sets the servo directly with the control pulse width in microseconds.

set_servo_us

Inputs

  • Field ID: servo channel number (1 to 8).
  • time: pulse length in microseconds (typically approx. 600 to 2400).

Output

  • None (statement block).

When to use it

  • For fine calibration of the servo outside of the normal angular transmission.
  • When you need to precisely control the neutral point or limits.

Tips and pitfalls

  • Too short or too long a pulse can mechanically overload the servo.
  • Safely start around the middle, eg 1500 µs.

Generated Python example

servo1.write_us(int(1500))