Why so many numbers for the same thing?
Wiring PI Pin Number | BCM Pin Number | Header pin number
| Header pin number | BCM Pin Number | Wiring PI Pin Number |
---|
| 3.3v | 1 | 2 | 5v | |
8 | BCM 2 (SDA) | 3 | 4 | 5v | | 9 | BCM 3 (SCL) | 5 | 6 | Ground | | 7 | BCM 4 (GPCLK0) | 7 | 8 | BCM 14 (TxD) | 15 | | Ground | 9 | 10 | BCM 15 (RxD) | 16 | 0 | BCM 17 | 11 | 12 | BCM 16 (PWM0) | 1 | 2 | BCM 27 | 13 | 14 | Ground | | 3 | BCM 22 | 15 | 16 | BCM 23 | 4 | | 3.3v | 17 | 18 | BCM 24 | 5 | 12 | BCM 10 (MOSI) | 19 | 20 | Ground | | 13 | BCM 9 (MISO) | 21 | 22 | BCM 25 | 6 | 14 | BCM 11 (SCLK) | 23 | 24 | BCM 8 (CE0) | 10 | | Ground | 25 | 26 | BCM 7 (CE1) | 11 | 30 | BCM 0 (ID_SD) | 27 | 28 | BCM 1 (ID_SC) | 31 | 21 | BCM 5 | 29 | 30 | Ground | | 22 | BCM 6 | 31 | 32 | BCM 12 (PWM0) | 26 | 23 | BCM 13 (PWM1) | 33 | 34 | Ground | | 24 | BCM 19 (MISO) | 35 | 36 | BCM 16 | 27 | 25 | BCM 26 | 37 | 38 | BCM 20 (MOSI) | 28 | | Ground | 39 | 40 | BCM 21 (SCLK) | 29 |
| Legend
Power | Common | SPI (Serial Peripheral Interface Bus) | I2C (Inter-Integrated Circuit) | Serial | Pulse-width-modulation |
|
- The BCM2835 C library uses the header pin numbers
- The PHP library uses the BCM numbers
ResourcesRaspberry PI Pinout