Say hello to the GPIO
The GPIO connector is the large group of pins on the edge of your Raspberry Pi board. On earlier models, there were 26 pins that made up this connector. But, ever since the Model B+, there have been 40 pins, although the first 26 pins are identical to the previous models, and it's these 26 pins we'll be working with. You won't need to worry about the rest of the pins.
Essentially, the GPIO connector provides access to following:
- Power supplies
- Digital I/O pins
- I2C bus
- SPI bus
- UART Serial bus
Some of the pins on the GPIO have more than one purpose, depending on how they are programmed. The following diagram is a reference guide to all of the pins on the GPIO. The GPIO numbers on the yellow labels relate directly to those on the Broadcom chip, and are numbers generally used within the scripts.
Digital I/O pins
The GPIO has 8 digital input/output pins available for use. These can be used to switch things on and off (in output mode), and also to detect when external...