code: private Boolean removeSerialPort() {
          Boolean ret = true;
  
          if (serialPort != null) {
              ret = serialPort.disconnect();
              serialPort = null;
          }
  
          return ret;
      }
docs: Disconnect from the SerialPort object that we are communicating with over the Firmata protocol.
  
  @return True if the SerialPort was closed. False if the port failed to close.