Configure the OpenServo PID

The OpenServo comes by default with a conservative "safe" PID settings. You should tune your PID settings to suit your servo

[Expand here]

Assuming device address = 0x10

Set position

16 bit precision

0x22

PID_PGAIN_HI

Read/Write Protected

PID proportional gain high byte

0x23

PID_PGAIN_LO

Read/Write Protected

PID proportional gain low byte

0x24

PID_DGAIN_HI

Read/Write Protected

PID derivative gain high byte

0x25

PID_DGAIN_LO

Read/Write Protected

PID derivative gain low byte

0x26

PID_IGAIN_HI

Read/Write Protected

PID integral gain high byte

0x27

PID_IGAIN_LO

Read/Write Protected

PID integral gain low byte

As with any I2C transaction, this 16 bit value must be split into 2 8 bit bytes. All that is required, is to send the upper and lower nibbles of the byte.

Example:

PID_PGAIN_HI = 0x22 PID_PGAIN_LO = 0x23
[device PID_PGAIN_HI {p_hi} {p_lo}]
send: [0x10 0x22 {p_hi} {p_lo}]