RaspberryPi and WiringPi pin-assignment

P1: The Main GPIO connector:

wiringPi

Pin

BCM

GPIO

Name

Header

Name

BCM

GPIO

wiringPi

Pin

3.3v

1 | 2

5v

8

R1:0
/ R2:2

SDA0

3 | 4

DNC

9

R1:1
/ R2:3

SCL0

5 | 6

0v

7

4

GPIO7

7 | 8

TxD

14

15

DNC

9 | 10

RxD

15

16

0

17

GPIO0

11 | 12

GPIO1

18

1

2

R1:21

/ R2:27

GPIO2

13 | 14

DNC

3

22

GPIO3

15 | 16

GPIO4

23

4

DNC

17 | 18

GPIO5

24

5

12

10

MOSI

19 | 20

DNC

13

9

MISO

21 | 22

GPIO6

25

6

14

11

SCLK

23 | 24

CE0

8

10

DNC

25 | 26

CE1

7

11

wiringPi

Pin

BCM

GPIO

Name

Header

Name

BCM

GPIO

wiringPi

Pin


P5: The auxilliary GPIO connector on Rev. 2 boards:

wiringPi Pin

BCM GPIO

Name

Header

Name

BCM GPIO

wiringPi Pin

5v

1 | 2

3.3v

17

28

GPIO8

3 | 4

GPIO9

29

18

19

30

GPIO10

5 | 6

GPIO11

31

20

0v

7 | 8

0v

wiringPi

Pin

BCM

GPIO

Name

Header

Name

BCM

GPIO

wiringPi

Pin