This function gets present current 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.getPresentCurrent(1)); //use default raw value
Serial.print(dxl.getPresentCurrent(2, UNIT_MILLI_MAPERE)); //use mA
Serial.print(dxl.getPresentCurrent(3, UNIT_PERCENT)); //use percentage (-100 ~ 100 %)