servo_set_pulse

Description

This function sets the angle of the RC servo. The angle is a fraction of the full travel of the servo. The smallest fraction is 1/255, the largest fraction is 255/255.

RC servos have a range of travel. Some servos will travel 90 degrees, others 180 degress. The XCSB servo subsystem divides this travel into 255 units. For a 90 degree full travel servo each step is 0.35 degrees. For a 180 degree full travel servo each step is 0.70 degrees.

Definition

servo_set_pulse(ubyte id, ubyte width)

Library

LIB/servo_lib.bas

Usage

On entry:
id is the servo to be set
width is the angle to which the servo is to be set
On exit:
There is no return value