The Raspberry Pi 4 is a credit-card-sized single-board computer running full Linux distributions. Its 40-pin GPIO header exposes digital I/O, I2C, SPI, UART, and power rails. Popular for both software projects and physical computing, robotics, and home servers.
| Pin | Name | Function | Type |
|---|---|---|---|
| 1 | 3V3 Power | 3.3V power rail | PWR |
| 2 | 5V Power | 5V power rail | PWR |
| 3 | GPIO2 / SDA1 | I2C data | BUS |
| 5 | GPIO3 / SCL1 | I2C clock | BUS |
| 6 | Ground | Ground | GND |
| 8 | GPIO14 / TXD | UART transmit | BUS |
| 10 | GPIO15 / RXD | UART receive | BUS |
| 11 | GPIO17 | General purpose I/O | I/O |
| 12 | GPIO18 | General purpose I/O, PCM CLK | I/O |
| 19 | GPIO10 / MOSI | SPI0 MOSI | BUS |
| 21 | GPIO9 / MISO | SPI0 MISO | BUS |
| 23 | GPIO11 / SCLK | SPI0 clock | BUS |
| 24 | GPIO8 / CE0 | SPI0 chip select 0 | BUS |
| 25 | Ground | Ground | GND |
| 26 | GPIO7 / CE1 | SPI0 chip select 1 | BUS |
| 39 | Ground | Ground | GND |
| 40 | GPIO21 | General purpose I/O | I/O |