Skip to main content

setOperatingMode

Description

This function changes operating mode of DYNAMIXEL.

Syntax

  • setOperatingMode(id, mode)

Parameters

  • id : ID of a specific DYNAMIXEL. Data type : unsigned int8
  • mode : Operating mode to use. Data type : unsigned int8
DecimalDefinedMode
0OP_POSITIONPosition Control Mode
1OP_EXTENDED_POSITIONExtended Position Control Mode
2OP_CURRENT_BASED_POSITIONCurrent-based Position Control Mode
3OP_VELOCITYVelocity Control mode
4OP_PWMPWM Control Mode
5OP_CURRENTCurernt Control Mode

Returns

  • True(1) on success.
  • False(0) on failure.

Example

const int DXL_DIR_PIN = 2;
Dynamixel2Arduino dxl(Serial1, DXL_DIR_PIN);
dxl.setOperatingMode(1, OP_POSITION);