Solved Issue with serial communication with Arduino
-
@aha_1980 : You can refer to the terminal example in the qtcreator's example list
I am using the same example.
And i am using arduino leonardo, it program is in the given link.
Please let me know of any other detail if required -
You will need to show us [...] the exact error message here...
Can you verify that the data you send arrives at the Arduino?
-
@aha_1980 : I was searching on internet and came across an topic which co-relates to my issue.
Please have a look on the given link:
https://stackoverflow.com/questions/31560694/qt-serial-port-not-workingThe serial error which i get when i connect with baud rate 1200 is as follows:
Critical Error: The I/0 operation has been aborted because of either a thread exit or an application request.
-
Hi,
You should connect the
errorOccured
signal of your serial port and handleQSerialPort::ResourceError
which would likely be close the port and open it again. Note that your arduino serial device might have had its name changed depending on the system. -
@SGaist : One more thing i tried to communicate the same program using arduino uno and there is no issue with the program it works fine without any error any issue.
Currently i am using arduino leonardo for my project and i need to move on with the same device.
My python program and serial simulator program works fine with the board without giving any error and this scenario occur with qt program so just not able to figure out where exactly the problem is. -
@SGaist : Thanks for your response. I tried to play with the terminal examples in qt example set and got the stuff working.
Following are the observations:- First you have to configure the port in the settings and set the flow control to RTS/CTS.
Earlier was set to noflowcontrol. - Connect the port
3.Disconnect the port
4.Reconnect the port
Note: The above approach implies when arduino is disconnected and reconnected or fresh program is burned into the arduino.
Apart from that only step 1 and 2 was sufficient.
In case of Arudino uno only step 1 & 2 were required even after reconnecting and burning fresh program. May be because of the hardware specifications.
Wondering why i have to connect, disconnect and again reconnect to get it working and only hardware flow control is working. - First you have to configure the port in the settings and set the flow control to RTS/CTS.
-
For the control flow, check your Arduino documentation regarding the serial port settings.
-
Ohk thanks a lot
-
This post is deleted! -
This post is deleted!