Raspberry Pi GPIO (General Purpose Input/Output) pins provide the hardware interface between the Pi and the physical world. The 40-pin header supports digital I/O, I2C, SPI, UART, PWM, and power rails. Understanding BCM vs physical numbering prevents wiring mistakes that can damage the board.

40-Pin GPIO Header (Pi 4 / Pi 5)

3.3V 5V GND GPIO Special
Pin # BCM Name Functions Notes

Electrical Limits

  • Logic level: 3.3V (NOT 5V tolerant)
  • Max per GPIO: 16 mA
  • Max total GPIO: 50 mA
  • 3.3V rail: ~50 mA available
  • 5V rail: limited by PSU

I2C Addresses

  • SDA: GPIO2 (Pin 3)
  • SCL: GPIO3 (Pin 5)
  • Built-in 1.8kΩ pull-ups
  • Default speed: 100 kHz
  • Fast mode: 400 kHz

SPI0 Pins

  • MOSI: GPIO10 (Pin 19)
  • MISO: GPIO9 (Pin 21)
  • SCLK: GPIO11 (Pin 23)
  • CE0: GPIO8 (Pin 24)
  • CE1: GPIO7 (Pin 26)