An LED is a small light that runs from low-voltage DC, such as the 3.3V or 5V on an Arduino, ESP32 or Raspberry Pi, with a resistor in series to set the current. These are standard 5mm round-top through-hole LEDs in five colours. Red, green and white have water-clear lenses, which look clear when they are off and show their colour only when lit. Yellow and blue have lenses tinted in their own colour, so they are easy to pick out of a parts tray.
Use them as power and status lights, front-panel indicators, or for your first blink sketch. The leads are 2.54mm apart, so they push straight into a breadboard or a standard 0.1 inch PCB, and a 5mm hole holds them in a panel. Red, green and yellow run happily from 3.3V or 5V. Blue and white need about 3V themselves, so on a 3.3V pin they work with a small resistor but are brightest and most even from 5V. They are sold individually with a minimum of 10, and you will need one resistor per LED, which is not included.
Specifications
By colour (typical at 20mA)
Datasheets
Wiring & getting started
- Find the long lead
The long lead is the anode (+). The short lead and the flat edge on the rim are the cathode (-). Check this before you trim the leads, because after trimming the flat edge is the only guide.
- Pick the resistor
For about 5 to 10mA: on 5V use 330 ohm for red, green or yellow and 220 ohm for blue or white. On 3.3V use 150 ohm for red, green or yellow and 47 ohm for blue or white. The 600-piece metal film resistor kit has all four values.
- Wire it in series
With the power off, connect the supply or board pin to the resistor, the resistor to the long lead, and the short lead to GND. The resistor can go on either side of the LED as long as everything is in one line. Give every LED its own resistor.
- Switch on and check
The LED lights steadily in its colour. If it stays dark, switch off and turn it round so the long lead faces the positive side.
- Blink it from an Arduino (optional)
Wire the resistor to pin 13 instead of the supply, then open File > Examples > 01.Basics > Blink in the Arduino IDE and upload it to an Uno or Nano. The LED turns on for one second and off for one second, over and over.
