Plotting real-time Arduino data

In the previous chapter, while dealing with GUI and Arduino data, you must have noticed that the code was updating the interface with every new value that was obtained from the Arduino sensors. Similarly, in this exercise, we will be redrawing the plot every time we receive new values from Arduino. Basically, we will be plotting and updating a real-time chart instead of plotting the entire set of sensor values as we did in the previous exercise.

We will be using the same Arduino circuit that you built in the previous exercises. Here, we will utilize only the potentiometer section of the circuit to obtain the analog sensor values. Now, before we explain the new methods used in this exercise, let's first open the program ...

Get Python Programming for Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.