Improved PyQt Color Wheel Project

In this video lesson we improve last weeks project by making the PyQt widget more virtual. The PyQt widget generates 3 sine waves, one for the Red color channel, one for the Green color channel, and one for the Blue color channel. The three sine waves are displayed on the widget. You are then given the opportunity in the widget to scale any of the three color channels. This allows you to calibrate your RGB LED in case any color channel is dominating. The widget also features a “Chase” mode where you can introduce phase injection into any of the color channels. This causes one or more of the color channels to “chase” the other ones. In this version, we preserve the phase as we turn the chase mode on or off. We also add buttons at the bottom of the widget to show the composite color being generated, as well as the individual R, G, and B color channels. This is the circuit schematic we are using on the Pi Pico side.

Circuit Schematic for Connecting the RGB LED

This is the code we developed to run on the Pi Pico side. It is the server side.

You need to create this file, and save it as “secrets.py” in the lib folder of your raspberry pi Pico.

And finally, this is the client side program which will run on your PC.