plot real time graphs using qt

Plot Real-time Graphs using Qt on Embedded Linux

Last month, some folks had mailed me and commented on one of my youtube videos asking for a code and tutorial on plotting real-time sensor data in Qt. So, here you go! 🙂

I have demonstrated the real-time plotting capabilities of Qt using the BeagleBone Black. If you haven’t set up the Qt cross-platform development environment on your machine, please do so by following the steps described here.

I have used the qcustomplot Library for plotting the graphs. So for this demo, I basically have a  Force Sensor whose output is sampled using an AD7190 ADC and fed into the BeagleBone + 4D Systems LCD.

If you are wondering how to use the AD7190 with the Beaglebone which is out of scope for this post, then I suggest you check out this article, as it has all the information you need.

You can find the Qt example code in my Github or clone it by using the below command.

The above video demonstrates the working of the example code and use of the qcustomplot Library for plotting real-time graphs for the sensor data. I hope you enjoyed this post and if you have any thoughts, please feel free to comment.

8 thoughts on “Plot Real-time Graphs using Qt on Embedded Linux”

  1. Hi Vinay,

    Thank-you very much for such a great post.

    Really easy to understand and follow.

    Does this work for qt5 as well?


    1. I believe these features are there inbuilt. Like for e.g. auto scale. If not, maybe you can just implement them when you are creating the plots. I don’t remember exactly as I had done this long ago.

  2. autoconf is failing with AC_MSG_ERROR undefined. Suggestions?

    libtoolize: putting auxiliary files in .'.
    libtoolize: copying file
    libtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4/internal'.
    libtoolize: copying file
    libtoolize: copying file m4/internal/ltoptions.m4'
    libtoolize: copying file
    libtoolize: copying file m4/internal/ltversion.m4'
    libtoolize: copying file
    configure:13130: error: possibly undefined macro: AC_MSG_ERROR
    If this token and others are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.
    autoreconf: /usr/bin/autoconf failed with exit status: 1

Leave a Reply

Your email address will not be published. Required fields are marked *