mix feetech.set_id (feetech v0.2.3)

Copy Markdown View Source

Sets the ID of a Feetech servo.

Usage

mix feetech.set_id PORT NEW_ID [OPTIONS]

Arguments

  • PORT - Serial port (e.g., /dev/ttyUSB0)
  • NEW_ID - New servo ID (1-253)

Options

  • --current-id, -c - Current servo ID (default: 1)
  • --baud-rate, -b - Baud rate (default: 1000000)
  • --broadcast, -B - Use broadcast ID (0xFE) to address any servo. Only use when a single servo is connected.

Examples

# Set servo with ID 1 to ID 5
mix feetech.set_id /dev/ttyUSB0 5

# Set servo with ID 3 to ID 7
mix feetech.set_id /dev/ttyUSB0 7 --current-id 3

# Set any connected servo to ID 1 (only one servo connected)
mix feetech.set_id /dev/ttyUSB0 1 --broadcast

# Use different baud rate
mix feetech.set_id /dev/ttyUSB0 5 --baud-rate 115200

Notes

The servo's EEPROM lock will be temporarily disabled to write the ID, then re-enabled after. The servo will respond with its new ID after the change.

When using --broadcast, ensure only ONE servo is connected to avoid setting multiple servos to the same ID.