You are viewing an older revision! See the latest version

SerialPortPlot

Serial Port Plotter

This is a Windows application that displays real time data from serial port. I had to create it for a project and I would like to put the code here so more people could use it. The application is 32-bit and built with Qt and QCustomPlot library. It can plot up to three axes and 1000 data points. Plot refresh rate is 20 Hz, independent of incoming data frequency. It can also export JPG with the plot.

The application supports zooming and dragging using the mouse wheel. Clicking anywhere in the plot displays the X and Y values of the graph in the status bar.

Screenshot

/media/uploads/borislav/screen.jpg

How to use the application

Just send your integer data over the serial port. The application expects certain format so it can differentiate between values. Each message you send must start with '$' and end with ';' (semi-colon) and the integers inside need to be comma-separated. The Help button displays comprehensive instructions. Example: If you need to plot three values, use this code in your mbed source file:

send data over the serial port

pc.printf("$%d %d;", data1, data2);
wait_ms(10); 

Source

To include download link


All wikipages