Adding Slider Bars to Your PyQt Arduino Project

In this lesson we add slider bars to our PyQt widget. The slider bars will be used to control the color of an RGB LED, but this week we are simply getting the slider bars incorporated into the widget and then next week we will connect them to the Arduino. This is the schematic for the arduino we are using for the next few lessons:

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 Arduino 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.

This is the code for the server on the Arduino:

Remember you will need the secrets.h tab in order to have your WiFi login credentials.

 

The code below creates a PyQt widget with three slider bars. In this code, we are just demonstrating use of Slider Bars. Next week we will connect the Slider bars to the Arduino over WiFi for controlling RGB Color.