---
# System prepended metadata

title: How to connect a Raspberry Pi to a breadboard?
tags: [Raspberry Pi]

---

Here’s a clean, safe way to bridge your [Raspberry Pi](https://www.ampheo.com/c/raspberry-pi/raspberry-pi-boards) to a solderless [breadboard](https://www.onzuu.com/category/solderless-breadboards), plus two tiny test circuits so you know it’s working.
![20201021_133358](https://hackmd.io/_uploads/ryq5HjPage.png)

**What you need**

* Raspberry Pi with 40-pin GPIO ([Pi 4](https://www.ampheo.com/search/Pi%204)/5/[Zero 2](https://www.ampheo.com/product/raspberry-pi-zero-2-w-25441000), etc.)
* Solderless breadboard (full or half size)
* Male–female [jumper wires](https://www.onzuu.com/category/jumper-wire) (or a T-Cobbler + 40-pin ribbon for a neater setup)
* 1× LED, 1× 330–1 kΩ [resistor](https://www.onzuu.com/category/resistors), 1× momentary [pushbutton](https://www.onzuu.com/category/pushbutton-switches) (optional)

Pi GPIO is 3.3 V only. Never feed 5 V into a GPIO pin. Power motors/relays from separate supplies.

**Option A — Direct jumpers (quick)**

1. Put the Pi next to the breadboard.
2. Run GND (Pin 6) → breadboard – (blue) rail.
3. Run 3V3 (Pin 1) → breadboard + (red) rail (for small sensors/LEDs only).
4. Use more jumpers from GPIO pins to your components on the breadboard.

**Option B — T-Cobbler (tidy & labeled)**

1. Plug the T-Cobbler into the breadboard (straddling the center gap).
2. Connect the ribbon cable to the Pi’s GPIO (red stripe = Pin 1).
3. The Cobbler mirrors all pins onto labeled rows, with +/– rails for 3V3/GND.

**Quick test #1 — LED on GPIO17**

**Wiring**

* GPIO17 (Pin 11) → 330–1 kΩ → LED anode (+)
* LED cathode (–) → GND rail

**Python (gpiozero)**

```
# sudo apt install python3-gpiozero
from gpiozero import LED
from time import sleep

led = LED(17)  # BCM numbering
while True:
    led.on();  sleep(0.5)
    led.off(); sleep(0.5)
```

**Quick test #2 — Button on GPIO27 (internal pull-up)**

**Wiring**

* One button leg → GPIO27 (Pin 13)
* Other leg → GND rail

**Python**

```
from gpiozero import Button
from signal import pause

btn = Button(27, pull_up=True)  # pressed = LOW to GND
btn.when_pressed  = lambda: print("Pressed")
btn.when_released = lambda: print("Released")
pause()
```

**Power & safety tips**

* Use the Pi’s 3V3 for small logic/[sensors](https://www.ampheo.com/c/sensors) only (LEDs, I²C, etc.). For anything hungry (motors, long LED strips), use a separate supply and common ground.
* Common ground is mandatory: Pi GND ↔ breadboard GND ↔ external device GND.
* Keep per-pin current small (single-digit mA). Use [transistors](https://www.onzuu.com/category/transistors)/[MOSFETs](https://www.onzuu.com/category/fets-mosfets) or driver boards for loads.
* If you also bring 5 V to the breadboard (for 5 V sensors), do not tie it to the 3V3 rail; level-shift signals to the [Raspberry Pi](https://www.ampheoelec.de/c/raspberry-pi/raspberry-pi-boards).

**Handy GPIO landmarks (BCM → header pin)**

* 3V3 = Pin 1, 5V = Pins 2/4, GND = Pins 6/9/14/20/25/30/34/39
* GPIO2/3 (Pins 3/5) = I²C SDA/SCL
* GPIO14/15 (Pins 8/10) = UART TX/RX
* GPIO10/9/11 (Pins 19/21/23) = SPI MOSI/MISO/SCLK