

The Raspberry Pi Pinout is a detailed diagram that illustrates the arrangement and functionality of the GPIO (General Purpose Input/Output) pins on a Raspberry Pi board. Manufactured by RPPO (Part ID: RPPO), this pinout provides essential information about the power, ground, and communication protocol pins available on the Raspberry Pi. It is an indispensable reference for developers, hobbyists, and engineers working on Raspberry Pi-based projects.








The Raspberry Pi GPIO header typically consists of 40 pins (on most modern Raspberry Pi models). These pins are divided into power, ground, and GPIO pins, with some dedicated to specific communication protocols. Below are the key technical details:
The following table provides a detailed description of the 40-pin GPIO header:
| Pin Number | Pin Name | Function/Description |
|---|---|---|
| 1 | 3.3V Power | 3.3V power output |
| 2 | 5V Power | 5V power output |
| 3 | GPIO2 (SDA1) | I2C Data (SDA) |
| 4 | 5V Power | 5V power output |
| 5 | GPIO3 (SCL1) | I2C Clock (SCL) |
| 6 | GND | Ground |
| 7 | GPIO4 | General-purpose GPIO |
| 8 | GPIO14 (TXD) | UART Transmit (TX) |
| 9 | GND | Ground |
| 10 | GPIO15 (RXD) | UART Receive (RX) |
| 11 | GPIO17 | General-purpose GPIO |
| 12 | GPIO18 (PWM0) | PWM output |
| 13 | GPIO27 | General-purpose GPIO |
| 14 | GND | Ground |
| 15 | GPIO22 | General-purpose GPIO |
| 16 | GPIO23 | General-purpose GPIO |
| 17 | 3.3V Power | 3.3V power output |
| 18 | GPIO24 | General-purpose GPIO |
| 19 | GPIO10 (MOSI) | SPI Master Out Slave In (MOSI) |
| 20 | GND | Ground |
| 21 | GPIO9 (MISO) | SPI Master In Slave Out (MISO) |
| 22 | GPIO25 | General-purpose GPIO |
| 23 | GPIO11 (SCLK) | SPI Clock (SCLK) |
| 24 | GPIO8 (CE0) | SPI Chip Enable 0 (CE0) |
| 25 | GND | Ground |
| 26 | GPIO7 (CE1) | SPI Chip Enable 1 (CE1) |
| 27 | GPIO0 (ID_SD) | I2C ID EEPROM Data |
| 28 | GPIO1 (ID_SC) | I2C ID EEPROM Clock |
| 29 | GPIO5 | General-purpose GPIO |
| 30 | GND | Ground |
| 31 | GPIO6 | General-purpose GPIO |
| 32 | GPIO12 (PWM0) | PWM output |
| 33 | GPIO13 (PWM1) | PWM output |
| 34 | GND | Ground |
| 35 | GPIO19 (MISO) | SPI Master In Slave Out (MISO) |
| 36 | GPIO16 | General-purpose GPIO |
| 37 | GPIO26 | General-purpose GPIO |
| 38 | GPIO20 (MOSI) | SPI Master Out Slave In (MOSI) |
| 39 | GND | Ground |
| 40 | GPIO21 (SCLK) | SPI Clock (SCLK) |
RPi.GPIO or gpiozero in Python to control the GPIO pins programmatically.If you are interfacing the Raspberry Pi with an Arduino UNO, you can use the following example code to send data from the Arduino to the Raspberry Pi via UART:
// Arduino UNO Code: Send data to Raspberry Pi via UART
void setup() {
Serial.begin(9600); // Initialize UART communication at 9600 baud
}
void loop() {
Serial.println("Hello, Raspberry Pi!"); // Send a message to the Raspberry Pi
delay(1000); // Wait for 1 second before sending the next message
}
On the Raspberry Pi, you can use the following Python code to receive the data:
import serial
ser = serial.Serial('/dev/ttyS0', 9600)
while True: if ser.in_waiting > 0: # Check if data is available data = ser.readline().decode('utf-8').strip() # Read and decode data print(f"Received: {data}") # Print the received message
GPIO Pins Not Responding
sudo raspi-config and enable GPIO under the "Interfacing Options."Incorrect Voltage Levels
Communication Protocol Not Working
Overheating or Damage
Q: Can I power the Raspberry Pi through the GPIO pins?
Q: How do I identify the GPIO pin numbers?
pinout command in the Raspberry Pi terminal to display a detailed pinout diagram.Q: Can I use multiple communication protocols simultaneously?
This documentation provides a comprehensive guide to understanding and using the Raspberry Pi Pinout effectively. For further assistance, refer to the official Raspberry Pi documentation or community forums.