Simple functions to communicate with servomotors RX-24F from Robotis. More...
#include "dynamixel.h"
Go to the source code of this file.
Functions | |
void | InitDynamixel () |
void | ISR_TimeOut_Dynamixel () |
void | SendPacket (unsigned char ID, unsigned char Instruction, unsigned char *Parameters=0, int Nb=0) |
int | ReceivePacket (unsigned char *Buffer, int NbMax, long TimeOut_Us=1000000) |
int | Errors (unsigned char *Packet) |
void | EmptyReceptionBuffer () |
Variables | |
bool | TimeOutFlag = false |
Simple functions to communicate with servomotors RX-24F from Robotis.
See also :
dynamixel.h
The header File Reference.
Dynamixel
A class which uses the present library.
Definition in file dynamixel.cpp.
void EmptyReceptionBuffer | ( | ) |
Empty the reception buffer (usefull when a reception error occurenced)
Definition at line 176 of file dynamixel.cpp.
int Errors | ( | unsigned char * | Packet | ) |
Check if a return packet contains no error
Packet | The return packet to check (a character's array) |
Definition at line 127 of file dynamixel.cpp.
void InitDynamixel | ( | ) |
Initialize transmission with servomotors
Definition at line 14 of file dynamixel.cpp.
void ISR_TimeOut_Dynamixel | ( | ) |
int ReceivePacket | ( | unsigned char * | Buffer, |
int | NbMax, | ||
long | TimeOut_Us | ||
) |
Receive a return packet for servomotors (a timeout is specified to prevent a reception error)
Buffer | Used to save communication reception |
NbMax | Defines the length of data to read |
TimeOut_Us | Defines the length of the time out in microseconds |
Definition at line 81 of file dynamixel.cpp.
void SendPacket | ( | unsigned char | ID, |
unsigned char | Instruction, | ||
unsigned char * | Parameters, | ||
int | Nb | ||
) |
Send a packet to all servos (if ID is defined as 0xFE) or just one (if another ID is specified)
ID | Defines the servo to communicate with |
Instruction | The instruction to send (see the defines chapter to know possible actions) |
Parameters | An array which contains the parameters of the instruction (if any) |
Nb | Specifies the number of parameters |
Definition at line 41 of file dynamixel.cpp.