1 #ifndef motor_constants_h
2 #define motor_constants_h
23 #define MOTOR_ADDRESS_OFFSET 0x140
29 #define MOTOR_COMMAND_READ_PID_PARAMETERS 0x30
30 #define MOTOR_COMMAND_WRITE_PID_PARAMETERS_TO_RAM 0x31
31 #define MOTOR_COMMAND_WRITE_PID_PARAMETERS_TO_ROM 0x32
32 #define MOTOR_COMMAND_READ_ACCELERATION 0x33
33 #define MOTOR_COMMAND_WRITE_ACCELERATION_TO_RAM 0x34
34 #define MOTOR_COMMAND_READ_ENCODER_POSITION 0x90
35 #define MOTOR_COMMAND_WRITE_ENCODER_POSITION_OFFSET 0x91
36 #define MOTOR_COMMAND_WRITE_CURRENT_POSITION_TO_ROM 0x19
37 #define MOTOR_COMMAND_READ_MULTI_TURN_ANGLE 0x92
38 #define MOTOR_COMMAND_READ_SINGLE_CIRCLE_COMMAND 0x94
39 #define MOTOR_COMMAND_READ_MOTOR_STATUS_1_AND_ERROR_FLAG 0x9A
40 #define MOTOR_COMMAND_CLEAR_MOTOR_ERROR_FLAG 0x9B
41 #define MOTOR_COMMAND_READ_MOTOR_STATUS_2 0x9C
42 #define MOTOR_COMMAND_READ_MOTOR_STATUS_3 0x9D
43 #define MOTOR_COMMAND_MOTOR_OFF 0x80
44 #define MOTOR_COMMAND_MOTOR_STOP 0x81
45 #define MOTOR_COMMAND_MOTOR_RUNNING 0x88
46 #define MOTOR_COMMAND_TORQUE_CLOSED_LOOP 0xA1
47 #define MOTOR_COMMAND_SPEED_CLOSED_LOOP 0xA2
48 #define MOTOR_COMMAND_POSITION_CLOSED_LOOP_1 0xA3
49 #define MOTOR_COMMAND_POSITION_CLOSED_LOOP_2 0xA4
50 #define MOTOR_COMMAND_POSITION_CLOSED_LOOP_3 0xA5
51 #define MOTOR_COMMAND_POSITION_CLOSED_LOOP_4 0xA6
const int MAX_ENCODER_VALUE
const double MULTI_TURN_THRESHOLD
const int MAX_TORQUE_CURRENT
const int MOTOR_BAUD_RATE
const double GEAR_REDUCTION
const double ROTATION_DISTANCE