Robotis Dynamixel Pro Quick Start Manual page 120

Table of Contents

Advertisement

Quick Start for Dynamixel Pro v1.00b
printf(
"Succeed to open USB2Dynamixel!\n"
// must close USB-to-Dynamixel before ending
DXL.Disconnect();
return
0;
}
ii. Enabling Dynamixel PRO
-
As previously mentioned baud rate of Dynamixel PRO and USB-to-Dynamixel
must match.
-
This can be easily achieved by simply setting the value for baud rate.
-
After setting matching baud rate wirte commands to EEPROM area can be sent
-
Torque Enable must be on to send write commands to the RAM area.
-
Read commands can be sent at any time regardless of Torque Enable value.
/dxl_sdk-20/example/TorqueEnable/main.cpp (partly shown)
// declare the following in preprocessor for illustrative purposes
#define TORQUE_ENABLE
#define DEFAULT_BAUDNUM
...
using namespace
DXL_PRO;
Dynamixel DXL("/dev/ttyUSB0");
int
main()
{
int
result, error = 0, On;
// open device
if( DXL.Connect() == 0 )
{
printf(
"Failed to open USB2Dynamixel!\n"
return
0;
}
else
printf(
"Succeed to open USB2Dynamixel!\n"
// Now verify baudrate USB-to-Dynamixel
if(DXL.SetBaudrate(DEFAULT_BAUDNUM) ==
{
printf( "Succeed to set USB2DXL baudrate to 57600 bps!\n" );
}
else
{
printf( "Failed to set USB2DXL baudrate to 57600 bps!\n" );
printf( "Press any key to end ...\n" );
_getch();
return
0;
}
printf( "Turning Torque Enable on for ID 1\n" );
562
1
// must declare location of USB-to-Dynamixel
// declare arbitrary variables for read commands
);
);
);
true)
Page 120 / 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

Table of Contents