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 output pins of our Arduino, knowing the LED we want to control has its node wired to the output pin and its cathode wired to the ground, with a resistor on the line too.
We can discuss the different ways of controls, and you are going to understand...