O'Reilly logo

C Programming for Arduino by Julien Bayle

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

Using RGB LEDs

RGB stands for Red, Green, and Blue, as you were probably guessing.

I don't talk about LEDs that can change their color according to the voltage you apply to them. LEDs of this kind exists, but as far as I experimented, these aren't the way to go, especially while still learning steps.

I'm talking about common cathode and common anode RGB LEDs.

Some control concepts

What do you need to control an LED?

You need to be able to apply a current to its legs. More precisely, you need to be able to create a difference of potential between its legs.

The direct application of this principle is what we have already tested in the first part of this chapter, which remind us how we can switch on an LED: we you need to control the current using digital ...

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