Tag Archives: RGB

Convert HSV to RGB in Micropython


In this video lesson we showed how to convert an angle on the HSV color wheel into an RGB value that can be applied to an RGB LED. In effect, we can find a color we like on the HSV color wheel, and turn the LED in our project that color. The video above shows the framework we are using, and then derives the equations, and then develops the code. For your convenience, the code for the conversion is shown below. To make this a library, we save it as h2RGB.py on our Raspberry Pi Pico W. You can save it either in the same folder your main programs are in, or in the lib folder. To use the library, then simply import the file (h2RGB) and call the method h2RGB.getRGB(degrees), where degrees is the point on the HSV color wheel you want to convert. All of this is explained in detail in the above video.

 

ARDUINO TUTORIAL 68: Make a Remote Controlled RGB LED with Brightness and Color Control

RGB LED Remote Control
This is our Remote Controlled RGB LED

In this lesson we take you through step-by-step instructions on creating a remotely controlled RGB LED.  This is the solution to the Homework Assignment given in Tutorial 68. It is important for you to try and complete this on your own before looking at my solutions.

We are building this with parts from our Elegoo Kit , and our actual build is using an Arduino Nano, which allows the project to be built on a single breadboard. You can get the neat jumper wires HERE.

This video steps you through our build.

Below is the code we developed in this video.

Arduino Tutorial 20: Understanding RGB LED’s

In this lesson you will learn how to work with RGB LED’s. RGB LED’s can be used to create not only the primary colors, but also all mixtures of the primary colors. This video shows you how to connect up a Common Cathode RGB LED. This project is a little more complex than the ones we have done in the past, so I include the code down below. While the code is here for your reference, you should not just copy and paste it. In order to really learn, you need to type it in for yourself, and then find and debug your mistakes. If you just copy and paste from me, you will never learn how to troubleshoot.

In these lessons, we are using the Elegoo Arduino kit, which you can purchase HERE.