Quick Start for Dynamixel Pro v1.00b
}
int
main(void)
{
SerialPort sp = {0,0,0,0,0};
SerialPort *Port = &sp;
//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
}
printf("Press any key to change the operating
_getch();
Result = dxl_write_byte(Port, ID, P_OPERATING_MODE, 1, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
{
printf(
printf(
_getch();
return
}
else
{
if(ErrorStatus != 0 )
else
}
//Torque On
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 chage the operationg
);
);
);
mode...\n");
);
mode!\n");
Page 70 / 139
Need help?
Do you have a question about the Dynamixel Pro and is the answer not in the manual?
Questions and answers