Raspberry Pi

The GPIO module supports all Raspberry Pi models up to the 4B, but not all models have been tested. If you encounter any problems or errors, please open a new issue and post your logs.

Raspberry Pi 40-pin

This pinout applies to the B+, A+, 2B, Zero, ZeroW, 3B, 3B+, and 3A+ models.

WiringPi

SoC

Board

Raspberry Pi 40-pin

Board

SoC

WiringPi

3.3V

1

2

5V

8

2

3

SDA1

3

4

5V

9

3

5

SCL1

5

6

Ground

7

4

7

GPCLK0

7

8

TXD0

8

14

15

Ground

9

10

RXD0

10

15

16

0

17

11

11

12

PWM0

12

18

1

2

27

13

13

14

Ground

3

22

15

15

16

16

23

4

3.3V

17

18

18

24

5

12

10

19

MOSI0

19

20

Ground

13

9

21

MISO0

21

22

22

25

6

14

11

23

SCLK0

23

24

CS00

24

8

10

Ground

25

26

CS01

26

7

11

30

0

27

SDA0

27

28

SCL0

28

1

31

21

5

29

29

30

Ground

22

6

31

31

32

PWM0

32

12

26

23

13

33

PWM1

33

34

Ground

24

19

35

MISO1

35

36

CS10

36

16

27

25

26

37

37

38

MOSI1

38

20

28

Ground

39

40

SCLK1

40

21

29

Raspberry Pi 26-pin Revision 2

This pinout applies to the B rev2, and A models.

WiringPi

SoC

Board

Raspberry Pi 26-pin Rev2

Board

SoC

WiringPi

3.3V

1

2

5V

8

2

3

SDA1

3

4

5V

9

3

5

SCL1

5

6

Ground

7

4

7

GPCLK0

7

8

TXD0

8

14

15

Ground

9

10

RXD0

10

15

16

0

17

11

11

12

PWM0

12

18

1

2

27

13

13

14

Ground

3

22

15

15

16

16

23

4

3.3V

17

18

18

24

5

12

10

19

MOSI0

19

20

Ground

13

9

21

MISO0

21

22

22

25

6

14

11

23

SCLK0

23

24

CS00

24

8

10

Ground

25

26

CS01

26

7

11

Raspberry Pi 26-pin Revision 1

This pinout applies to the B-rev1 model.

WiringPi

SoC

Board

Raspberry Pi 26-pin Rev1

Board

SoC

WiringPi

3.3V

1

2

5V

8

0

3

SDA0

3

4

5V

9

1

5

SCL0

5

6

Ground

7

4

7

GPCLK0

7

8

TXD0

8

14

15

Ground

9

10

RXD0

10

15

16

0

17

11

11

12

PWM0

12

18

1

2

21

13

13

14

Ground

3

22

15

15

16

16

23

4

3.3V

17

18

18

24

5

12

10

19

MOSI0

19

20

Ground

13

9

21

MISO0

21

22

22

25

6

14

11

23

SCLK0

23

24

CS00

24

8

10

Ground

25

26

CS01

26

7

11