GPIO and Header
GPIO (General Purpose Input/Output) pins are powerful feature of the Raspberry Pi. GPIO header is found on all. The GPIO header have a 0.1" (2.54mm) pin pitch. GPIO allow user to connect electronic components like LEDs and sensors. Some pins have specific functions like providing power, I2C, SPI, and UART communication protocols or PWM.
Pinout depicts pin 1 in the top left corner. Pin 1 is the only pin with a square solder pad, which may only be visible from the underside of your Pi.
The Raspberry Pi GPIOs provide the following peripheral interface options:
3.3V
5V
Ground
General purpose input and output
PWM (pulse width modulation)
I2C
PCM
SPI
Serial (UART)
Digital Inputs and Outputs
Raspberry Pi has 16 GPIOs that user can use to connect peripherals. These GPIOs can be used either as inputs or outputs. Additionally, some of them support specific communication protocols.
I2C Pins
I²C (Inter-Integrated Circuit) is a synchronous, multi-master, multi-slave communication protocol. It allows user to establish communication with other microcontroller devices, sensors, or displays, for example one can connect multiple I2C devices to the same pins as long they have a unique I2C address.
The Raspberry Pi I2C pins are GPIO 2 and GPIO 3:
SDA: GPIO 2
SCL: GPIO 3