setFineTuneOffset

setFineTuneOffset(port, offset, ezbIndex)

Parameters

port - Servo port (i.e. d0 v2
offset - Value of the offset. Can be a positive or negative value
ezbIndex - The ezb to apply this offset value (optional)

Description

Sets the global fine-tune offset in positions of the specified servo. For example, if you set the offset to +10, every servo position set by other robot skills or script commands will add 10 positions. If you query the servo position, it'll return 10, not 20.

One of the uses for this could be used to maintain servos upright from an IMU, such as in this post.

Example

// Set the servo D0 to an offset of +20 positions
setFineTuneOffset(D0, 20);

// Set the servo D0 to an offset of -15 positions
setFineTuneOffset(D0, -15);