From the course: Learning Arduino: Pulse Width Modulation

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using an RGB LED

Using an RGB LED - Arduino Tutorial

From the course: Learning Arduino: Pulse Width Modulation

Start my 1-month free trial

Using an RGB LED

- Color mixing is a great use of PWM. By turning on various colored LEDs at different intensities, I can create any color in the rainbow. This is how your computer creates colors on a monitor. An RGB LED is a special type of LED that combines three LEDs into one. RGB stands for red, green, blue, and is a way of mixing light to create colors. This is called an additive color system. In this system, the absence of color, or light, is black. By turning on each of the three colors at different brightness, you can create any color in the color wheel. Mixing these three colors at full strength creates white light. RGB LEDs have four leads. There are two common ways that those four leads will be set up. These configurations are referred to as "Common Cathode" or "Common Anode". A common cathode RGB LED has one anode lead for each LED. The three colors share a single cathode, or ground. This is the easiest configuration to work with on the Arduino. Simply hook each anode up to a PWM pin, and…

Contents