C++ (Qt) SerialPort *serial = new SerialPort(port); if (serial->open(QIODevice::WriteOnly)){ serial->setRate(SerialPort::Rate9600); serial->setDataBits(SerialPort::Data8); serial->setParity(SerialPort::NoParity); serial->setStopBits(SerialPort::OneStop); serial->setFlowControl(SerialPort::NoFlowControl); serial->write(message); serial->close(); } else{ qDebug()<<"ERROR: port "<<port<<" is close"; }
C++ (Qt)serial->write(message);
C++ (Qt)serial->write(message);serial->flush();