O'Reilly logo

Mastering Arduino by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction

In this chapter, we will look at how to use RGB LEDs and a WS2812 40 RGB LED Pixel Arduino shield. Let's start off by learning about the RGB LED.

A multicolor or RGB LED isn't really a single LED that can change color, it is actually three LEDs. An RGB LED contains three LEDs, which are red, green, and blue in color. The color that the LED produces is a combination of the colors produced by these three LEDs.

There are two types of RGB LEDs. These are the common anode and the common cathode LED. In a common cathode LED, the three LEDs share a common ground source, and in a common anode RGB LED, the three LEDs share a common power source.

The RGB LED has four pins, one for each color and the fourth one for the common cathode or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required