The last demo of basic LED programming is to work with an RGB LED. This LED can emit monochromatic light, which could be one of the three primary colors—red, green, and blue, known as RGB.
The RGB LED connection is shown in the following figure:
In this section, we will build a simple program to display red, green, and blue colors through the RGB LED.
The following hardware components are needed:
Our hardware wiring can be implemented as follows: