Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Read from serial port not working when "connect" method is used to call the read method.
QtWS25 Last Chance

Read from serial port not working when "connect" method is used to call the read method.

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt serialportread serialarduinoreadonly
2 Posts 2 Posters 275 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Greeshma
    wrote on 16 Nov 2022, 18:18 last edited by
    #1

    Hi All,
    I have a problem with my code. I have a write to arduino from Qt, followed with a read from QT which receives data from arduino.
    Again there is another write from QT to arduino , followed with a read from QT which receives data from arduino.
    Problem - > If I call all the read methods without connect function everything works but the only issue is that QT will not receive data in the first call , I mean I have to do the write for a second time to receive the data from arduino.
    If I call the read method using the "connect" method in Qt it works just fine , read data happens in a single call but only the first read and write will work. The second write to arduino and the following read will not give me any data.

    Please help . I have been trying to solve this for a long time.

    Thanks
    Greeshma

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Nov 2022, 19:21 last edited by
      #2

      Hi and welcome to devnet,

      Several users on this forum are successfully using QSerialPort to communicate with Arduino boards so it should be a good solution.

      Can you share the code you use ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      16 Nov 2022, 18:18

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved