Quick Start for Dynamixel Pro v1.00b
1.2.5 Using Multiple Dynamixel PROs
i. Controlling the LEDs of 3 Dynamixel PROs
-
Implement dxl_synch_write to simultaneously send a command to multiple
Dynamixel PROs.
-
The program's entire source code is shown below.
main.cpp
#include
<stdio.h>
#include
<conio.h>
#include
"dynamixel.h"
#define
COM_PORT_NUM
#define
BAUD_RATE_NUM
#define
P_LED_RED
#define
ID_1
#define
ID_2
#define
ID_3
// Print error bit of status packet
void PrintErrorCode(int
{
if(ErrorCode & ERRBIT_VOLTAGE)
printf("Input voltage
if(ErrorCode & ERRBIT_ANGLE)
printf("Angle limit
if(ErrorCode & ERRBIT_OVERHEAT)
printf("Overheat
if(ErrorCode & ERRBIT_RANGE)
printf("Out of range
if(ErrorCode & ERRBIT_CHECKSUM)
printf("Checksum
if(ErrorCode & ERRBIT_OVERLOAD)
printf("Overload
if(ErrorCode & ERRBIT_INSTRUCTION)
printf("Instruction code
}
int
main(void)
{
SerialPort sp = {0,0,0,0,0};
SerialPort *Port = &sp;
17
3
563
1
2
3
ErrorCode)
error!\n");
error!\n");
error!\n");
error!\n");
error!\n");
error!\n");
error!\n");
//Comport Number of USB2DXL
//Baudrate Number of Dynamixel PRO
//Address of LED RED in Control Table
//ID of Dynamixel PRO you use
Page 97 / 139
Need help?
Do you have a question about the Dynamixel Pro and is the answer not in the manual?
Questions and answers