RGB LEDs with Ardui...
 
Notifications
Clear all

RGB LEDs with Arduino - Standard & NeoPixel


DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 3 years ago
Posts: 1096
Topic starter  

Learn to use RGB LEDs with an Arduino. We'll cover both standard and NeoPixel varieties.

Article with code at https://dbot.ws/rgbled

RGB or Red Green Blue LEDs are useful little devices that can add a splash of color to your Arduino projects. Today we will learn how RGB LEDs work, how addressable RGB LEDs (also called NeoPixels) operate, and how we can incorporate them into our Arduino designs.

We start with a bit of color theory that explains how the primary colors red, green and blue can be used to create almost any color in the rainbow.

Next, we’ll look at conventional RGB LEDs, both common anode and common cathode. I’ll show you how to calculate the correct value for the dropping resistors you’ll need to work with these devices.

Then we’ll hookup a common anode and a common cathode RGB LED to an Arduino. Using three potentiometers we will control the intensity of the red, green and blue light to create custom colors.

After that, we will move on to working with the WS2812 addressable RGB LED, also known as a NeoPixel. I’ll show you how they differ from conventional RGB LEDs and how you can “daisy chain” them together to allow you to drive multiple RGB LEDs using a single Arduino I/O port.

Of course, we will then run some code to produce a colorful light display using multiple NeoPixel LEDs.

Here is the Table of Contents for this video:

00:00 - Introduction
03:00 - Understanding Color
06:59 - Basic RGB LEDs
07:57 - Calculating Dropping Resistors
11:43 - RGB LED Demo
14:38 - RGB LEDs with Arduino
25:15 - NeoPixel (WS2812) RGB LEDs
30:15 - Using NeoPixels with Arduino

RGB LEDs have a lot of uses. They can be used for status indicators, custom lighting effects, and even as video displays.

I hope you enjoy this colorful episode. As always you can get more details and all the code on the article at https://dbot.ws/rgbled.

"Never trust a computer you can’t throw out a window." — Steve Wozniak


Quote