Quick Start for Dynamixel Pro v1.00b
//Open the port of USB2DXL
if(dxl_initialize(Port, COM_PORT_NUM, BAUD_RATE_NUM) == COMM_RXSUCCESS )
printf("Succeed to open
else
{
printf(
printf(
_getch();
return
}
int
Result, ErrorStatus;
//Torque Off
printf(
"Torque Off...\n"
Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 0, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
{
printf(
printf(
_getch();
return
}
int
desired_ID = 3;
//Change the ID of Dynamixel PRO you use
printf("Press any key to change the ID of Dynamixel PRO you
_getch();
Result = dxl_write_byte(Port, ID, P_ID, desired_ID, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
{
printf(
printf(
_getch();
return
}
else
{
if(ErrorStatus != 0 )
else
}
//Close the port of USB2DXL
printf(
"Press any key to terminate...\n"
_getch();
dxl_terminate(Port);
USB2Dynamixel!\n");
"Failed to open USB2Dynamixel!\n"
"Press any key to terminate...\n"
0;
);
"Failed to write!\n"
);
"Press any key to terminate...\n"
0;
"Failed to write!\n"
);
"Press any key to terminate...\n"
0;
PrintErrorCode(ErrorStatus);
printf("Succeed to chagne the ID of Dynamixel PRO you
);
);
);
);
);
use\n");
use!\n");
Page 48 / 139
Need help?
Do you have a question about the Dynamixel Pro and is the answer not in the manual?