Skip to Content
Raspberry Pi User Guide, 3rd Edition
book

Raspberry Pi User Guide, 3rd Edition

by Eben Upton, Gareth Halfacree
September 2014
Beginner
312 pages
7h 6m
English
Wiley
Content preview from Raspberry Pi User Guide, 3rd Edition

Chapter 15

The GPIO Port

THE RASPBERRY PI’S general-purpose input-output (GPIO) port is located on the top-left of the printed circuit board, labelled P1. The port is fitted with two rows of 13 male 2.54mm headers at the factory, or two rows of 20 in the case of the Raspberry Pi Model B+. The spacing of these headers is particularly important: 2.54mm pin spacing (0.1 inches in imperial measurements) is a very common sight in electronics and is the standard spacing for prototyping platforms that include stripboards and breadboards.

Identifying Your Board Revision

The pin layout of the Raspberry Pi’s GPIO port differs depending on what revision of the board you own. All Model As and recent Model Bs have a common pin layout; the original Model B, however, has a slightly different layout, while the latest Model B+ has an elongated 40-pin GPIO port.

Before using the GPIO port for a hardware project, be sure you know which model of Raspberry Pi you have. If you have a Model A, you can use the first diagram in this chapter; if you have a Model B, you should also use the first diagram—unless it’s an original Revision 1 model.

The easiest way to spot a Model B Revision 1 board is to look at the top side of the board, just underneath the GPIO pins themselves. Where a Revision 2 board has two rows of four copper-plated holes, the Revision 1 is solid. This is the P5 header, which is used by some add-on boards—note that this is missing from the original Revision 1 board and also from the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Raspberry Pi User Guide, 4th Edition

Raspberry Pi User Guide, 4th Edition

Eben Upton, Gareth Halfacree
Getting Started With Raspberry Pi, 4th Edition

Getting Started With Raspberry Pi, 4th Edition

Shawn Wallace, Matt Richardson, Wolfram Donat

Publisher Resources

ISBN: 9781118921678Purchase book