Skip to main content

api_reference_connector

  • Connector class provides methods to manage communication with DYNAMIXEL motors, including reading and writing data, creating motor instances, and handling group executions.
  • It includes an PortHandler and PacketHandler for communication and creates Motor instances and GroupExecutor.

Connector Class

MethodReturn TypeDescription
Connector(port_name: str, baud_rate: int)-Initializes the connector.
createMotor(id: int)MotorCreates Motor instance for the specified ID.
createAllMotors(start_id: int = 0, end_id: int = 252)List[Motor]Creates list of all Motor instances within the given ID range.
createGroupExecutor()GroupExecutorCreates GroupExecutor instance.
read1Byte(motor_id: int, address: int)IntReads 1byte data from the address of a specific ID.
read2Bytes(motor_id: int, address: int)IntReads 2byte data from the address of a specific ID.
read4Bytes(motor_id: int, address: int)IntReads 4byte data from the address of a specific ID.
write1Byte(motor_id: int, address: int, value: int)-Writes 1byte data to the address of a specific ID.
write2Bytes(motor_id: int, address: int, value: int)-Writes 2byte data to the address of a specific ID.
write4Bytes(motor_id: int, address: int, value: int)-Writes 4byte data to the address of a specific ID.
reboot(motor_id: int)-Reboots the specified motor.
ping(motor_id: int)IntPings the specified motor.
broadcastPing()List[int]Broadcast pings to all motors.
factoryReset(motor_id: int, option: int)-Performs factory reset on the specified motor.
closePort()-Closes the communication port.

Variables

VariableTypeAttributeDescription
_packet_handlerPacketHandlerclassUnderlying PacketHandler instance.
_port_handlerPortHandlerinstanceUnderlying PortHandler instance.