Introduction: PYTHON GUI LED CONTROL

Almost everyone of you are well familiar with Arduino and basic projects related to it. And to name the very basic projects with arduino, what comes in mind are nothing else than LED Blink and LED Control via Serial Communication.

Here I'll show you how to control LED with Arduino, but you guys might know about this already, I am adding a little trick, I am going to do this with the help of Python. So basically Python will interact with the Serial Port & overwrite commands to it which will eventually conversate with the microcontroller embedded into an Arduino Board. There will be on screen buttons to control the state of the LED.

Step 1: Hardware Requirements

To implement the project, you need very few hardware components as listed below:

  1. Arduino Board (any of arduino varieties will work, I am using UNO here)
  2. LED (If you don't have it, you can use built-in LED of Arduino board, just replace led pin number with LED_BUILTIN in the arduino code)
  3. Resistor (needed only if you are using external led, minimum 470 ohms recommended, don't use resistor more than 1K, else led glow will be very dim)
  4. USB Cable for connecting Arduino with computer
  5. JumperWires - As required

Step 2: Software Requirements

  1. Any Python IDE (If you use any text editor instead IDE, it will work fine also)
  2. Arduino IDE

Step 3: Video Instruction

Step 4: Code Files