Results 1 to 7 of 7

Thread: Problem sending data over to serial port

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Qt products
    Qt5
    Platforms
    MacOS X
    Thanks
    13
    Thanked 153 Times in 150 Posts

    Default Re: Problem sending data over to serial port

    Are you entering integer values into the textedit? i.e. 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21? If so, you should be converting to integer using base 10, which is the default for QString::toInt. Your code above is treating your input as hex values, not integer.

    For your code to work as shown, you'd need to be entering hex values: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,10,11,12,13,14,15.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

  2. The following user says thank you to jefftee for this useful post:

    hovuquocan1997 (28th July 2015)

  3. #2
    Join Date
    Jul 2015
    Posts
    18
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    11

    Default Re: Problem sending data over to serial port

    Thank you very much! That was the case.

Similar Threads

  1. Sending serial data over ethernet
    By awpitt13 in forum Newbie
    Replies: 2
    Last Post: 27th February 2017, 13:06
  2. How to interrupt serial port sending?
    By redkit_redkit in forum Qt Programming
    Replies: 3
    Last Post: 9th April 2014, 12:58
  3. Replies: 2
    Last Post: 15th March 2014, 11:54
  4. serial port printer sending commands, how?
    By triperzonak in forum Qt Programming
    Replies: 3
    Last Post: 6th April 2009, 14:51
  5. sending QImage over serial port
    By yagabey in forum Qt Programming
    Replies: 5
    Last Post: 16th January 2008, 21:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.