Hello,
I’m using MX-106T servos and OPENRB-150 control board, and I met some troubles when setting their velocities in position mode. As shown below, I changed the velocity to 10 or 30, but they still move very fast. Could you please help me check if there are any mistakes in my arduino code? Thank you!
const uint8_t DXL_ID2 = 2;
const float DXL_PROTOCOL_VERSION = 1.0;
Dynamixel2Arduino dxl(DXL_SERIAL, DXL_DIR_PIN);
using namespace ControlTableItem;
void setup() {
DEBUG_SERIAL.begin(115200);
while(!DEBUG_SERIAL);
dxl.begin(57600);
dxl.setPortProtocolVersion(DXL_PROTOCOL_VERSION);
dxl.ping(DXL_ID2);
dxl.torqueOff(DXL_ID2);
dxl.setOperatingMode(DXL_ID2, OP_POSITION);
dxl.torqueOn(DXL_ID2);
dxl.writeControlTableItem(MOVING_SPEED, DXL_ID2, 10);
}
void loop() {
dxl.setGoalPosition(DXL_ID2, 70);
Serial.println(dxl.readControlTableItem(PRESENT_SPEED, DXL_ID2));
delay(2000);
dxl.setGoalPosition(DXL_ID2, 330);
Serial.println(dxl.readControlTableItem(PRESENT_SPEED, DXL_ID2));
delay(2000);
}