#148
Raspberry Pi Pico: Controlling an External LED (GP14 + Breadboard)
The next step after Pico’s built-in LED: connecting an external LED to the breadboard and controlling it via the GP14 pin. In this project, you’ll learn how to use any of the Pico’s general-purpose GPIO pins as an output, the LED’s polarity (long leg = anode/+, short leg = cathode/–), and why a current-limiting resistor (220Ω) is required. If you don’t include the resistor, excessive current will flow through the LED and it may burn out. The circuit is very simple: Pico GP14 → 220Ω resistor → LE
0.0(0)

The next step after Pico’s built-in LED: connecting an external LED to the breadboard and controlling it via the GP14 pin. In this project, you’ll learn how to use any of the Pico’s general-purpose GPIO pins as an output, the LED’s polarity (long leg = anode/+, short leg = cathode/–), and why a current-limiting resistor (220Ω) is required. If you don’t include the resistor, excessive current will flow through the LED and it may burn out. The circuit is very simple: Pico GP14 → 220Ω resistor → LED (+) → LED (–) → Pico GND. You can simulate this in Wokwi and test it on a real breadboard using the same connection. In MicroPython, we define the pin as an output using `machine.Pin(14, Pin.OUT)`—this way, we can easily control multiple LEDs (traffic lights, running LEDs) in a future project.
Video
Circuit Diagram

Source Code
1# ─────────────────────────────────────────
2# BlueGrays · bluegrays.com
3# Raspberry Pi Pico Harici LED (GP14 + Breadboard)
4# ─────────────────────────────────────────
5# TR: Breadboard'a harici LED bagliyoruz — Pico'nun herhangi bir GPIO pinini output olarak nasil kullanacagimizi ogreniyoruz
6# EN: We connect an external LED on breadboard — learn how to use any Pico GPIO as output
7
8# ============ DEVRE / CIRCUIT ============
9# TR: Pico GP14 → 220Ω direnc → LED (+, uzun bacak) → LED (-, kisa bacak) → Pico GND
10# EN: Pico GP14 → 220Ω resistor → LED (+, long leg) → LED (-, short leg) → Pico GND
11
12from machine import Pin
13import time
14
15# ============ PIN / PIN ============
16LED_PIN = 14 # TR: Herhangi bir bos GPIO | EN: Any free GPIO
17led = Pin(LED_PIN, Pin.OUT)
18
19print("== BlueGrays: Pico Harici LED Blink ==")
20print("LED pin: GP" + str(LED_PIN))
21print("500ms yakip 500ms sonduruyor / 500ms on 500ms off")
22
23# ============ LOOP ============
24while True:
25 led.on() # TR: LED yak | EN: LED on
26 print("[LED] ACIK / ON")
27 time.sleep(0.5)
28
29 led.off() # TR: LED sondur | EN: LED off
30 print("[LED] KAPALI / OFF")
31 time.sleep(0.5)
32