Last active
May 24, 2018 20:54
-
-
Save abrugsch/c096637515f32efdf40f24e5e101b199 to your computer and use it in GitHub Desktop.
raspberry pi pinout dictionary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from reddit user /u/Grorco and thread https://www.reddit.com/r/raspberry_pi/comments/8lrgsk/raspberry_pi_pinout_dictionary/ | |
def pinoutdict(): | |
"""This returns a dictionary for Raspberry Pi 3 Model B, B+, RPI2 40Pin GPIO pinout. | |
Keys are ints of the GPIO.BOARD value, values are a list of pin properties.""" | |
pinout = {1:['3.3v'], | |
2:['5v'], | |
3:['GPIO','02','SDA1','I2C'], | |
4:['5v'], | |
5:['GPIO','03','SCL1','I2C'], | |
6:['GND'], | |
7:['GPIO','04','GCLK', 'GCLOCK', 'CLOCK'], | |
8:['GPIO','14','SERIAL','TX','UART'], | |
9:['GND'], | |
10:['GPIO','15','SERIAL','RX','UART'], | |
11:['GPIO','17'], | |
12:['GPIO','18','PWM'], | |
13:['GPIO','27'], | |
14:['GND'], | |
15:['GPIO','22'], | |
16:['GPIO','23'], | |
17:['3.3v'], | |
18:['GPIO','24'], | |
19:['GPIO','10','SPI','MOSI'], | |
20:['GND'], | |
21:['GPIO','9','SPI','MISO'], | |
22:['GPIO','25'], | |
23:['GPIO','11','SPI','CLOCK'], | |
24:['GPIO','08','SPI','CE0_N'], | |
25:['GND'], | |
26:['GPIO','07','SPI','CE1_N'], | |
27:['ID_SD','GPIO','00','I2C','EEPROM','DATA'], | |
28:['ID_SD','GPIO','01','I2C','EEPROM','CLOCK'], | |
29:['GPIO','05'], | |
30:['GND'], | |
31:['GPIO','6'], | |
32:['GPIO','12', 'PWM'], | |
33:['GPIO','13', 'PWM'], | |
34:['GND'], | |
35:['GPIO','19', 'PWM'], | |
36:['GPIO','16'], | |
37:['GPIO','26'], | |
38:['GPIO','20'], | |
39:['GND'], | |
40:['GPIO','21']} | |
return pinout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment