Image by Q-Branch (CC-BY-NC-SA)
LED stands for Light Emitting Diode. They’re generally small, energy-efficient lightbulbs that come in a multitude of different colors. There are two essential things to remember about LEDs. First, always include a resistor when hooking them up in a circuit. LEDs will burn out if exposed to too much current, so if you don’t include a resistor, they’ll stop working. Check the current rating on your parts and use Ohm’s Law to determine the resistor value you need. Second, double-check to make sure you’ve put them in your circuit in the right direction. LEDs are diodes, which means they only allow current to flow in one direction, like a battery. In general, the long leg is the positive terminal, which means it needs to be on the side closer to the power source, and the short leg is negative, closer to ground. If your LED doesn’t turn on, you may have put it in the wrong way, creating an open circuit.
Most LEDs take digital input, on or off. RGB LEDs, however, take in analog values and use them to turn different colors. If yours is common cathode, it means you connect the long leg to ground; if it’s common anode, you connect the long leg to power. The other three legs each control one color: red, green, and blue. If you supply power to the blue leg and cut it off from red and green, your light will be all blue. If you supply power to all three at once, the LED will be white. You can also supply analog values and make it turn different colors, like orange or purple. Experiment to see what’s possible!