Raspberry Pi — GPIO Pinout Quick Reference
Raspberry Pi — GPIO Pinout Quick Reference All Raspberry Pi models with the 40-pin header (Pi 2, 3, 4, 5, Zero, Zero 2W) share the same GPIO pinout. 40-Pin Header Layout Pins are numbered 1–40 left-to-right, top-to-bottom when the Pi is oriented with the USB ports facing down and the GPIO header at the top-right. Key Interfaces Electrical Limits All GPIO are 3.3V logic — never apply 5V to GPIO inputs Max current per pin: 16mA (8mA recommended) Max total GPIO current: 50mA Use level shifters for 5V devices Use transistors/MOSFETs for anything drawing more than 16mA Quick Reference Commands bash Visual pinout diagram in terminal pinout Read all GPIO states raspi-gpio get Set GPIO 17 as output, drive high raspi-gpio set 17 op dh Set GPIO 4 as input with pull-up raspi-gpio set 4 ip pu Links pinout.xyz — interactive pinout diagram gpiozero docs — best Python GPIO library BCM2837 datasheet
Related Guides
- Flipper Zero GPIO Pinout and Hardware Expansion: UART, I2C, ADC, 1-Wire, and Sensor Wiring
- Raspberry Pi GPIO Pin Current Limits
- Raspberry Pi Power Requirements
- How to Control GPIO Pins on Raspberry Pi with Python
- Automated Plant Watering System with Raspberry Pi
- Controlling GPIO Outputs with Python — LED, Relay, and Buzzer
- GPIO Basics on Flipper Zero — Wiring and Using Pins
- Raspberry Pi GPIO: Complete Beginner Guide with Python Examples