LED Displays & LEDs

Beginner Friendly

How LEDs create light, safe wiring with resistors, display types (single LED, 7‑segment, strips), and a first blink project.

What is an LED?

An LED (Light Emitting Diode) is a tiny semiconductor that glows when current flows in the forward direction.
It’s efficient, fast, and lasts a long time — perfect for indicators, displays, and colorful effects.

Polarity check: The anode (+) is usually the longer lead, and the cathode (−) sits next to a flat edge on the LED’s rim.

Safe Wiring — Use a Resistor

LEDs don’t limit their own current. Always add a current‑limiting resistor so they don’t burn out.

Rule of Thumb

For 5V systems with typical LEDs, 220–1kΩ usually works well.

Quick Math

R = (Vsup - Vf) / I
Example: (5V - 2V) / 0.02A ≈ 150Ω → choose 220Ω

Common LED “Display” Options

Single LEDs & Arrays

  • Status indicators
  • Bar graphs
  • Through‑hole or SMD parts

Seven‑Segment Displays

  • Shows numbers using 7 bars
  • Common anode or common cathode
  • Can be driven with shift registers

Addressable LED Strips (WS2812/NeoPixel)

  • One data wire controls many LEDs
  • Endless color animations
  • Use a separate 5V supply for larger strips

Your First Blink Project

const int LED_PIN = 13; // onboard LED
void setup() {{ pinMode(LED_PIN, OUTPUT); }}
void loop() {{
  digitalWrite(LED_PIN, HIGH); delay(500);
  digitalWrite(LED_PIN, LOW);  delay(500);
}}

Tip: Move the LED to a breadboard: Pin → Resistor → Anode, Cathode → GND.

Where You’ll Use It

  • Indicators and dashboards
  • Clocks and counters (7‑segment)
  • Decor and data‑viz (addressable strips)
Made for WordPress learners • Use freely in your projects.