Tag Archives: Serial Communication

Using an Arduino with Python LESSON 11: Controlling an LED from Python

In this video lesson, we show how to control an LED using python. Python sends commands to arduino, which then controls the LED. We also create a vPython visual, where the ‘Virtual’ LED mimics the behavior of the real LED. This a really cool demonstration and hope you enjoy it. I include below the code we develop in the video. On the arduino side we end up with the following:

And on the python side we have: