Using an Arduino with Python LESSON 4: Visual Display of Measured Voltage in Visual Python

In this lesson we show how you can measure a voltage from a potentiometer using Arduino, and then pass that data to Visual Python over the serial port. Then we use visual python to create a 3D model that is animated by the live data.

On the Arduino side we use the following code to measure the voltage from the potentiometer:

Then on the python side we read and display the data with the following code:

Watch the video for a complete explanation of the code.