PyQt5 Graphical User Interface for Control of Arduino Project Over WiFi

In this video lesson we create a client server connection between Python running on your desktop computer, and your Arduino project. We show how to make the connection over WiFi, and how to pass data and commands back and forth between your Arduino and your desktop computer. We then show how to build an attractive Graphical User Interface in PyQt5 to control your arduino project from your desktop wirelessly. For this simple example, we will control an RBG LED from the GUI.

This is the circuit schematic of the Arduino;

Schematic of our Arduino Uno R4 Wifi connected to an RGB LED

When using the breadvolt, or any battery power supply on a breadboard project, do not turn the power supply on while the Raspberry Pi Pico is connected to USB, as you could generate voltage conflicts. It is an either or. If the USB is connected, the power supply should be OFF. Or if you are going to connect the USB, first turn off the power supply.

For your convenience we include the code developed in the video below. This first program is the server side program, for the arduino:

You will need to save your WiFi name and password in your ‘secrets.h’ file, which you create in a new tab, as explained in the video.

Now, for the client side, this is the Python code for creating the Graphical User Interface using PyQt5.