Robotis Dynamixel Pro Quick Start Manual page 96

Table of Contents

Advertisement

Quick Start for Dynamixel Pro v1.00b
Result = dxl_write_byte(Port, ID, P_TORQUE_ENABLE, 1, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
{
printf(
printf(
_getch();
return
}
//Rotating Start
printf("Rotating
Result = dxl_write_dword(Port, ID, 600, 5000, &ErrorStatus);
if( Result != COMM_RXSUCCESS )
{
printf(
printf(
_getch();
return
}
printf("Press any key to terminate...\n"
printf("\n");
while(true)
{
if(_kbhit())
unsigned char
dxl_read(Port, ID, P_INDIRECT_DATA_0, 5, data, &ErrorStatus);
int
temp, present_position;
temp = data[0];
present_position = DXL_MAKEDWORD( DXL_MAKEWORD(data[1], data[2]),
DXL_MAKEWORD(data[3], data[4]) );
printf("\r");
printf("present temperature : %d, presen position :
}
printf("\n");
//Close the port of USB2DXL
dxl_terminate(Port);
return
0;
}
"Failed to write!\n"
);
"Press any key to terminate...\n"
0;
Start\n");
"Failed to write!\n"
);
"Press any key to terminate...\n"
0;
break;
data[5];
);
);
);
%d", temp, present_position);
Page 96 / 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?

Table of Contents