Arduino Real Time Multiple Plot with Python (Single Graph)

preview_player
Показать описание
This video shows a demonstration of a real time plot of Arduino's data using Python. The outputs from an accelerometer are read using Arduino UNO and then sent to the PC to be plotted using Python.

Although only 3 plots are shown in the video, the source code can be easily adapted to make multiple plots (in the same window or in different windows). I have also added in capabilities to export the data to a csv file within the Python source code.

If you are just looking to visualize the data or capture the data from Arduino, using Python to do it should be rather simple.

For the source code or more information, please visit

----------------------------------------
ThePoorEngineer
Woking Hard to be Lazy
----------------------------------------
Рекомендации по теме
Комментарии
Автор

It seems the syntax for matplotlib and PyQt-Graph is not compatible. Any thoughts on when one may be better suited over the other?

I'm trying to plot real-time data coming in from the serial port ("5, 0x1234, 1.938\r\n"), on a single graph, but I start to lose data after a few seconds.. any suggestions on either using concurrency (queue/collections.deque, threading, asyncio, multiprocessing) or whether to use matplotlib-blit, or PyQtGraph-split... or PyQt vs tkinter.... or any approach that would maximize the throughput so that no data gets dropped from the serial during the GUI update?

I'm running on a PC, but I saw an example of a fast oscilloscope on a Raspberry Pi using OpenGL/freeglut, however, the use of the GPU looks intimidating and perhaps overkill for my needs!

bennguyen
Автор

How to configure frequency sampling for fast acquisition in 1 sec ?

muhammadnafishzaldinanda
Автор

Hi iam using mpu6050 not adxl335 what changes needed to work with your code, appreciate any inputs

deepakjaiswal
Автор

Nice one bro, I tried your code and am getting errors. any help?

chineduernest