Robotis Dynamixel Pro Quick Start Manual page 54

Table of Contents

Advertisement

Quick Start for Dynamixel Pro v1.00b
printf("Instruction code
}
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;
//Turn off the LED
Result = dxl_write_byte(Port, ID, P_LED_RED,
Result = dxl_write_byte(Port, ID, P_LED_GREEN, 0, &ErrorStatus);
Result = dxl_write_byte(Port, ID, P_LED_BLUE, 0, &ErrorStatus);
//Turn on and change the color of LED in Dynamixel PRO
printf("Press any key to change the color of LED in Dynamixel
_getch();
Result = dxl_write_byte(Port, ID, P_LED_RED, 255, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
{
printf(
printf(
_getch();
return
}
else
{
if(ErrorStatus != 0 )
else
}
printf("Press any key to change the color of LED in Dynamixel
_getch();
Result = dxl_write_byte(Port, ID, P_LED_RED,
Result = dxl_write_byte(Port, ID, P_LED_GREEN, 255, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
error!\n");
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;
PrintErrorCode(ErrorStatus);
printf("Succeed to change the color of LED in Dynamixel
);
);
0, &ErrorStatus);
PRO\n");
);
PRO\n");
0, &ErrorStatus);
PRO!\n");
Page 54 / 139

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Dynamixel Pro and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents