This function gets baudrate of the serial port.
const int DXL_DIR_PIN = 2; Dynamixel2Arduino dxl(Serial1, DXL_DIR_PIN); Serial.print(dxl.getPortBaud());