Robot
The embedded systems for UTRA's autonomous humanoid soccer-playing robot
|
![]() |
Functions | |
void | Dynamixel_DataWriter (Dynamixel_HandleTypeDef *hdynamixel, uint8_t *args, uint8_t numArgs) |
Sends an array of data to a motor as per its configuration details. More... | |
uint16_t | Dynamixel_DataReader (Dynamixel_HandleTypeDef *hdynamixel, uint8_t readAddr, uint8_t readLength) |
Reads data back from the motor passed in by reference. More... | |
uint16_t Dynamixel_DataReader | ( | Dynamixel_HandleTypeDef * | hdynamixel, |
uint8_t | readAddr, | ||
uint8_t | readLength | ||
) |
Reads data back from the motor passed in by reference.
Uses the READ DATA instruction, 0x02, in the motor instruction set. The status packet returned will be of the following form
Where N = readLength. Also, this function computes the checksum of data using the same algorithm as the motors, and it sets ‘hdynamixel -> _lastReadIsValid’ if the computations match, and clears this field otherwise. This is a basic data integrity check that reduces the probability of passing invalid data to the application
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
readAddr | the address inside the motor memory table where reading is to begin |
readLength | the number of bytes to be read. Must be either 1 or 2 |
Definition at line 489 of file DynamixelProtocolV1_IO.c.
void Dynamixel_DataWriter | ( | Dynamixel_HandleTypeDef * | hdynamixel, |
uint8_t * | args, | ||
uint8_t | numArgs | ||
) |
Sends an array of data to a motor as per its configuration details.
Uses the WRITE DATA instruction, 0x03, in the motor instruction set.
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
args | an array of arguments of the form {ADDR, PARAM_1, ... , PARAM_N} |
numArgs | this must be equal to sizeof(args) , and must be either 2 or 3 |
Definition at line 438 of file DynamixelProtocolV1_IO.c.