connect
Open a serial port to auto-detect and connect to servomotors on an RS-485 bus. Specify a port or let the tool detect the available adapter.
Instructions
Open a serial port (230400 baud) and auto-detect the motors on that RS-485 bus.
port is a device name from list_serial_ports (e.g. "/dev/cu.usbserial-210",
"COM3", "/dev/ttyUSB0"). If omitted: uses $GEAROTONS_SERIAL_PORT if set, else the
single USB serial adapter if there is exactly one, else asks you to choose.
Detection reboots every motor on the bus (positions re-zero at the current shaft location, MOSFETs turn off) and takes ~3 s per attempt. If no motors are found, the adapter may be the wrong one — try another port. Connecting to a different port replaces the previous connection, but only once the new port opens successfully — a failed attempt leaves the old connection intact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| detect | No | ||
| detect_attempts | No |