Servo PWM editor

The Servo PWM editor lets you define or edit a servo controlled via a PWM signal. It supports two hardware modes: direct control on a GPIO pin (e.g. Arduino) or via an PCA9685 I2C expander. It opens from the start window → Elements tab → New or Edit button, selecting the Servo PWM type.

Main fields

FieldDescription
NameUnique servo identifier in the domain (e.g. "Left eye"). Required.
DescriptionFree notes about the element (optional).
TypeSet to Servo PWM.
PortDomain port to which the PWM controller is connected. Must use the D4C (DEIMOS) protocol.
ColorTrack color in the timeline. Click to change.

PIN mode (direct GPIO pin)

Used with microcontrollers such as Arduino. The servo is connected directly to a PWM pin on the board.

FieldDescription
ModeSelect PIN.
PinPWM pin number on the board (1–69). Required: pin 0 is not valid. On Arduino Uno the PWM pins are: 3, 5, 6, 9, 10, 11.

PCA9685 mode (I2C expander)

Used with the PCA9685 module connected via I2C. Allows controlling up to 16 servos per module.

FieldDescription
ModeSelect PCA9685.
ChannelPCA9685 channel the servo is connected to (0–15).
I2C address (hex)I2C address of the PCA9685 module in hexadecimal (default: 40). Varies based on the A0–A5 jumpers on the module.

Angular profile (common to both modes)

FieldDescription
Minimum angleMinimum angular position allowed during playback (degrees). Mechanical protection.
Maximum angleMaximum angular position allowed during playback (degrees).
Initial positionPosition in degrees the servo moves to when the port is opened and when playback ends.
On Arduino Uno/Nano only pins 3, 5, 6, 9, 10, 11 support hardware PWM. Using non-PWM pins will cause unpredictable behavior.

Common errors

MessageCause and solution
PWM pin not setThe pin is 0. Enter a value from 1 to 69 matching the PWM pin on the board.
Name already existsAn element with the same name already exists. Use a different name.
Duplicate pinAnother servo or switch on the same port already uses that pin. Each pin must be assigned to one element only.
Duplicate PCA9685 channelAnother servo on the same port and I2C address already uses that channel.
Port not compatibleThe selected port does not support the PWM protocol. Check the port configuration in the ports editor.

The pin is checked against the profile of the port's board: see Boards and reserved pins.

See also: Elements selection — Servo BUS editor — Switch editor — Ports editor — Servo segment editor