Send servo to position


I want to send a servo to a specific position in degrees.

The Set Target (Pololu/Compact protocol) command seems to send only time of movement.

What should be the basic algorithm to rotate the servo in x degrees from current position?
And also what should be the script to send the servo to an absolute position?

Any help would be appreciated.

EDIT - maybe I didn’t understand: Does the “set target” command send the target in µs of degree?


Hello, Omri.

Hobby RC servo signals work by modulating the pulse width of the signal (which is commonly measured in microseconds [µs]). The standard pulse width range is between 1000-2000 µs. The electronics in the servo measure the pulse width and map that to a position using feedback from inside the servo (typically a potentiometer). For some servos, this might map to a 90-degree range and for others it might map to a 180-degree range. This means that the Maestro cannot send a command to tell the servo to move a specific amount in degrees, since all servo electronics will interpret the pulse width signal differently.

You might try doing some testing to figure out how your particular servo behaves. A good starting point would probably be approximating a linear relationship between the pulse width and position.


1 Like