Sei sulla pagina 1di 2

GPIO Pinout

The majority of I/O pins on the Raspberry Pi exist on the 26-pin header labeled P1. Its
over in the corner of the board, adjacent to the composite video connector.

If youre coming to the Raspberry Pi as an Arduino user, youre probably used to


referencing pins with a single, unique number. Programming the Pis hardware works much
the same, each pin has its own numberand then some.
There are (at least) two, different numbering schemes you may encounter when referencing
Pi pin numbers: (1) Broadcom chip-specific pin numbers and (2) P1 physical pin numbers.
Youre usually free to use either number-system, but many programs require that you
declare which scheme youre using at the very beginning of your program.

Heres a table showing all 26 pins on the P1 header, including any special function they
may have, and their dual numbers:
Broadcom Pin

Function

P1 Pin

Function

Broadcom Pin

3.3V

5V

SDA

5V

SCL

GND

TX

14

10

RX

15

17

11

12

PWM

18

27

13

14

GND

22

15

16

23

3.3V

17

18

24

10

MOSI

19

20

MISO

21

22

11

SCLK

23

24

CE0

GND

25

26

CE1

GND

I2C

4
GND

Legend:

P1 Pin

5V

3.3V

GND
25

SPI

PWM

Note: The Broadcom pin numbers above relate to Rev2 of the Raspberry Pi only. If you
have an older Rev1 Pi, check out this link for your Broadcom pin numbers.
As you can see, the Pi not only gives you access to 17 bi-directional I/O pins, but
also Serial (UART), I2C, SPI, and even some PWM (analog output).

Potrebbero piacerti anche