Understanding the GPIO Pinout
The 40-pin header that connects your code to the outside world — power, ground, and general-purpose pins, mapped out so wiring mistakes are easy to avoid.
Every current Raspberry Pi model shares the same 40-pin GPIO header, laid out as two rows of 20. A few pin types matter most while you're learning:
| Pin (physical) | Function | Notes |
|---|---|---|
| 1, 17 | 3.3V power | Use for sensors and logic rated at 3.3V — most GPIO-connected parts |
| 2, 4 | 5V power | Higher current available; matches many relay and motor driver boards |
| 6, 9, 14, 20, 25, 30, 34, 39 | Ground (GND) | Any ground pin works the same as any other — use whichever is convenient |
| 11 (GPIO17), 13 (GPIO27), 15 (GPIO22)… | General-purpose I/O | Referred to by GPIO number in code, not physical pin number — see note below |
The most important habit to build now: Raspberry Pi pins have two different numbering systems, and mixing them up is the single most common beginner wiring mistake. The physical numbering (1–40) counts pin position on the header, left to right, top to bottom. The BCM/GPIO numbering (what you'll actually write in Python code, as in GPIO17) refers to the chip's internal pin naming, which doesn't run in the same simple order as the physical layout. Keep a labeled GPIO pinout reference nearby (many are printed directly onto official Pi cases) until this becomes second nature.
Unlike the Arduino Uno's 5V-tolerant digital pins, the Raspberry Pi's GPIO pins operate at 3.3V logic and are not 5V-tolerant — connecting a 5V signal directly to a GPIO pin can permanently damage it. Where the two boards differ like this, this course will flag it explicitly.