I am trying to send data from QSerialPort to Arduino Mega 2560. The proccess always takes some time to establish the connection.
How do I know with QSerialPort is the connections is ready to send data?
I don't know how much time do I have to wait for that and it happens every time when I run the application.
The configuration of my QSerialPort instance is:
mSerialPort = new QSerialPort(); mSerialPort->setPortName("COM3"); mSerialPort->setBaudRate(QSerialPort::Baud9600); mSerialPort->setDataBits(QSerialPort::Data8); mSerialPort->setParity(QSerialPort::NoParity); mSerialPort->setStopBits(QSerialPort::OneStop); mSerialPort->setFlowControl(QSerialPort::NoFlowControl); mSerialPort->open(QIODevice::ReadWrite);
I check the device configuration of COM port:
I also changed and play the Arduino delay but nothing changed.
I am sending to Arduino little piece of data. Example:
X100.10,Y10.23, H9999, ...others
And these data work when I am debugging the functions of my application. Everything is writting and work. So I am lost.
I hope all this information be usefull to give me an answer or at less some tips.