This function gets present velocity(wheel mode speed) of DYNAMIXEL.
getLastErrorCode()
to see if this value indicates an error. const int DXL_DIR_PIN = 2;
Dynamixel2Arduino dxl(Serial1, DXL_DIR_PIN);
Serial.print(dxl.getPresentVelocity(1)); //use default raw value
Serial.print(dxl.getPresentVelocity(2, UNIT_RPM)); //use RPM
Serial.print(dxl.getPresentVelocity(3, UNIT_PERCENT)); //use percentage (-100 ~ 100 %)