Displaying and storing the ADC value obtained over serial port



  • Hi guys

    I have wrote an user interface for interaction with the serial port and to display it's contents over the LCD display widget.

    Currently I am just sending a character and receiving a character in return.

    But now I want to add some extra functionalities to my user interface in which I want to let my user interface keep showing the changing ADC value of my microcontroller and also to store the first hundred readings of the ADC in
    a temporary buffer and than when user ask to save it than this data gets stored in a file like notepad.

    So can you people guide me the flow which I should follow and also which Qt classes will be most appropriate to me for my this task.

    Also I don't know that how to manage the buffer in the Qt.

    i.e. to store large amount of data and to store them on the harddrive and also to read them and to display on the display widget of the Qt.

    right now I just want to read the data coming from the ADC of my microcontroller over the serial port and than
    displaying it on the LCD widget of my User interface and than storing the first 100 values to a file when user ask
    to do so.


  • Lifetime Qt Champion

    Hi,

    You need to add some identification to the data you receive from your micro controller so you'll be able to easily parse it after your received it. As for storing the data since it's a small about you can use QQueue and QFile for writing the data on your disk.

    Hope it helps


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.