MSPCommunication constructor

MSPCommunication(
  1. String portName
)

Implementation

MSPCommunication(String portName) {
  port = SerialPort(portName);

  if (!port.isOpen) {
    bool opened = port.openReadWrite();
    if (!opened) {
      throw SerialPortError('Failed to open the port.');
    }
  }
}