The GPIO Connector

The diagram below show GPIO pinouts used on different models of the Raspberry Pi. The earlier revisions of the Raspberry Pi were 26-pin based while the newer models are 40-pin.

As well as supplying power (GND, 3.3V and 5V) all the GPIO pins can be used as either digital inputs or outputs. The pins labelled SCL and SDA can be used for I2C. The pins labelled MOSI, MISO and SCKL can be used to connect to high speed SPI devices.

All the pins have 3.3V logic levels and are not 5V-safe so the output levels are 0-3.3V and the inputs should not be higher than 3.3V. If you want to connect a 5V output to a Pi input, use a level shifter

A popular way to actually make the connections to the Raspberry Pi is to use a Pi Cobbler Plus or a Pi T-Cobbler Breakout for older 26-pin versions.

This uses a ribbon cable to connect the GPIO connector to solderless breadboard, where you can add your own components.

Make extra extra double-check sure that the PIN 1 indicator is in the corner of the Pi. If you have a gray cable its probably a red stripe, for black cables, a white stripe. That pin must not be next to the TV connector. Turn around or twist the cable until it is right
This guide was first published on Dec 14, 2012. It was last updated on Dec 14, 2012. This page (The GPIO Connector) was last updated on Aug 16, 2019.