Quick Start for Dynamixel Pro v1.00b
viii. Internal temperature feedback of Dynamixel PRO
-
So far, we have covered how to use the Write command to send commands to
Dynamixel PRO.
-
Next, we will go over how to use the Read command to receive data from
Dynamixel PRO.
-
The address of Present Temperature on the Control Table is 625 and is assigned 1
byte of memory.
-
Thus, dxl_read_byte function can be used to obtain the Current Temperature of
Dynamixel PRO.
-
The program's entire source is shown below.
main.cpp
#include
<stdio.h>
#include
<conio.h>
#include
"dynamixel.h"
#define
COM_PORT_NUM
#define
BAUD_RATE_NUM
#define
P_PRESENT_TEMPERATURE 625
Table
#define
ID
// 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)
17
3
1
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 Present Temperature in Contorl
//ID of Dynamixel PRO you use
Page 64 / 139
Need help?
Do you have a question about the Dynamixel Pro and is the answer not in the manual?
Questions and answers