Thuta Learning
IntermediateHardwarebeginner

Wiring an LED

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand wiring an LED, no intimidation required
  • Get comfortable running your own hardware wiring and code
  • Apply this concept right away in a real project

Let's think about it this way for a moment

A breadboard lets you connect up a circuit temporarily without soldering — its rows/columns are internally connected, so plugging a component's leg into a hole is enough to complete the circuit. You need to wire a resistor (330Ω-1kΩ) in series with the LED — without it, too much current flows through and can burn out the LED (the resistor 'protects' it).

Let's connect this to a real-world scenario

Here's how the circuit goes: from the Pi's GPIO pin (e.g. BCM 17), run a wire → breadboard row → resistor → LED's long leg (anode) → LED's short leg (cathode) → wire → back to the Pi's Ground (GND) pin, completing the 'circuit loop.' If you wire the LED in reverse, the light won't turn on — an LED only lets current flow in one direction, so polarity matters.

Let's look at an example together

text
LED Circuit Wiring
--------------------
GPIO pin (e.g. BCM 17) → wire → breadboard
breadboard → resistor (330Ω) → LED anode (long leg)
LED cathode (short leg) → wire → GND pin

(Full loop: GPIO → resistor → LED → GND)
You should see
You can look at your wiring and check whether the circuit loop is complete (GPIO → resistor → LED → GND).

5-Minute Try-It

Gather a breadboard, LED, resistor (330Ω), and 2 jumper wires, and (if you have a Pi) wire up the circuit yourself following the wiring diagram — no code yet, that's next lesson.

A quick word of caution

Keep the Pi powered off while wiring — changing wires while power is on risks a short circuit that can damage the GPIO pin (or even the whole Pi board).

Easy traps

  • Connecting the LED directly to a GPIO pin without a resistor, damaging the LED or the GPIO pin
  • Mixing up the LED's anode/cathode (long leg/short leg) and wiring it in reverse — the light won't turn on

Try It Yourself

Gather a breadboard, LED, resistor (330Ω), and 2 jumper wires, and (if you have a Pi) wire up the circuit yourself following the wiring diagram — no code yet, that's next lesson.

You'll know it worked when: You can look at your wiring and check whether the circuit loop is complete (GPIO → resistor → LED → GND).

Wiring an LED | Thuta Learning