2

This question already has an answer here:

What is the pin numbering for WiringPi on the RPi model 2 B and 3 B? The pin page on wiringPi only gives the numbering for Pis with 26 GPIO pins.

This is not a duplicate

because the WiringPi library's pin numbering is different to that of the RPi GPIO pin numbers and the Broadcom CPU pin IO numbers. The proposed duplicate Q&A's do not give the pin numbers for the WiringPi library; only GPIO and BCM pin numbering

marked as duplicate by Milliways, joan, Ghanima Nov 22 '16 at 15:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You obviously did not look at ALL the answers in the duplicate (or the detailed link above) - the accepted answer is not necessarily the best (IMHO). – Milliways Nov 22 '16 at 11:34
  • @Milliways I know this was a while ago, but how can you think that any of those answers address this question? Look at GPIO 18 (WiringPi 1). That match is nowhere on the other question. Not every question is a duplicate, and if you're not sure, don't mark it as such. – Prime624 Jun 11 at 16:39
3

The side where your micro sd card is the upper side, the first number is your gpio pin number from the RPi itself (in ascending order) then there is the Broadcom number, and between the parenthesis as you can see are the matching Wiring Pi numbers.

First the left row from up to down:

1 3v3 Power
3 BCM 2 (WiringPi 8)
5 BCM 3 (WiringPi 9)
7 BCM 4 (WiringPi 7)
9 Ground
11 BCM 17 (WiringPi 0)
13 BCM 27 (WiringPi 2)
15 BCM 22 (WiringPi 3)
17 3v3 Power
19 BCM 10 (WiringPi 12)
21 BCM 9 (WiringPi 13)
23 BCM 11 (WiringPi 14)
25 Ground
27 BCM 0 (ID_SD)
29 BCM 5 (WiringPi 21)
31 BCM 6 (WiringPi 22)
33 BCM 13 (WiringPi 23)
35 BCM 19 (WiringPi 24)
37 BCM 26 (WiringPi 25)
39 Ground

And the right row from up to down:

2 5v Power
4 5v Power
6 Ground
8 BCM 14 (WiringPi 15)
10 BCM 15 (WiringPi 16)
12 BCM 18 (WiringPi 1)
14 Ground
16 BCM 23 (WiringPi 4)
18 BCM 24 (WiringPi 5)
20 Ground
22 BCM 25 (WiringPi 6)
24 BCM 8 (WiringPi 10)
26 BCM 7 (WiringPi 11)
28 BCM 1 (ID_SC)
30 Ground
32 BCM 12 (WiringPi 26)
34 Ground
36 BCM 16 (WiringPi 27)
38 BCM 20 (WiringPi 28)
40 BCM 21 (WiringPi 29)

Source: https://pinout.xyz/pinout/wiringpi_gpio_pinout

  • 1
    It would be nice if these were marked on the Pi itself. What is the best way of locating them - by counting all the tiny pins by hand? – IgorGanapolsky Oct 25 '17 at 18:11
  • 2
    Well, there are some reference cards for sale that you can use to lay over the pins before you connect the wires, for example this one – Rizzle Light Oct 26 '17 at 19:25
  • Thanks! Does that replace the need for a RPi GPIO Breakout Expansion? – IgorGanapolsky Oct 26 '17 at 20:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.