dyamixel motor library
Fork of MX28 by
Diff: Mx28.h
- Revision:
- 4:ffe33f18ab21
- Parent:
- 3:e221394e585b
--- a/Mx28.h Mon Jul 17 02:19:12 2017 +0000 +++ b/Mx28.h Tue Oct 24 02:36:58 2017 +0000 @@ -68,7 +68,8 @@ #define RAM_LOCK 0x2F #define RAM_PUNCH_L 0x30 #define RAM_PUNCH_H 0x31 - +#define RAM_PRESENT_CURRENT_L 0x44 +#define RAM_PRESENT_CURRENT_H 0x45 #define RAM_TORQUE_CONTROL_MODE_ENABLE 0X46 #define RAM_GOAL_TORQUE_L 0X47 #define RAM_GOAL_TORQUE_H 0X48 @@ -100,6 +101,7 @@ #define READ_LOAD_LENGTH 0x04 #define READ_SPEED_LENGTH 0x04 #define READ_VOLT_LENGTH 0x04 +#define READ_CURRENT_LENGTH 0x04 #define READ_REGISTER_LENGTH 0x04 #define READ_MOVING_LENGTH 0x04 #define READ_LOCK_LENGTH 0x04 @@ -141,7 +143,7 @@ #define HEADER 0xFF -#define STATUS_PACKET_TIMEOUT 5 // in millis() +#define STATUS_PACKET_TIMEOUT 3 // in millis() #define STATUS_FRAME_BUFFER 5 @@ -188,6 +190,7 @@ unsigned int readTemperature(unsigned char); unsigned int readVoltage(unsigned char); + unsigned int readCurrent(unsigned char); unsigned int readPosition(unsigned char); unsigned int readLoad(unsigned char); unsigned int readSpeed(unsigned char);