Light Emitting Diodes (LEDs)
Light Emitting Diodes (LEDs) - A type of diode that illuminates when electricity passes through it. Like all diodes, electricity only flows in one direction through these components. You're probably familiar with these as indicators on a variety of electronic devices.
An LED, or light-emitting diode, is a component that converts electrical energy into light energy. LEDs are polarized components, which means they only allow electricity to flow through them in one direction. The longer leg on the LED is called an anode, it will connect to power. The shorter leg is a cathode and will con¬nect to ground. When voltage is applied to the anode of the LED, and the cathode is connected to ground, the LED emits light.

Testing a LED:
Never connect an LED directly to a battery or power supply because the LED is likely to be destroyed by excessive current passing through it. LEDs must have a resistor in series to limit the current to a safe value, for testing purposes a 220 resistor is suitable for most LEDs if your supply voltage is 5V.

Series Resistance Value Calculation:
To calculate the required current-limiting resistor for an LED, use this formula:
R = (Vs − Vf) ÷ I where Vs is the supply voltage (5 V); Vf is the LED forward voltage drop (say, 1.7 V), and I is the current required for the LED (15 mA). (The value of I must be in amps, so 10 mA converts to 0.01 A.)
Now let's use this for our LEDs—with a value of 5 V for Vs , 1.7 V for Vf ,and 0.015 A for I. Substituting these values into the formula gives a value for R of 220 ohms.
LEDs advantages:
LEDs have many advantages over incandescent light sources, including lower energy consumption, longer lifetime, improved physical robustness, smaller size, and faster switching.
LEDs Applications:
LEDs are used in automotive headlamps, advertising displays, general lighting, traffic signals, camera flashes and industrial devices.
Bi-Color Light Emitting Diodes:
The Bi-color LED is a handy little component that allows two colors (red, green) in a single LED having three pins (cathode and red, green). The color of the LED depends on the input given to the red or green pin.
The bi-color light emitting diodes are a type of LEDs similar to single color LEDs just with additional one more LED chip enclosed in the package. It Contains two LEDs in one package. In general, the two LED leads are connected in inverse parallel combination. The anode of one LED is connected to the cathode of another LED and vice versa. When the supply is given to either of the anode only one LED will glow. We can also turn on both LEDs at same time with dynamic switching at high speed.

Tri-Color LED:
This type of LED has three leads enabling any combination of LEDs to be light, i.e. the first LED, the second, or both. The most popular form of tri-colour LED uses a red and green diode. This means that when one diode is on, then either red or green is produced. If both are light, then the colours combine to form yellow.

IN/OUT Indicator using multi-color LED:
