GPIO pin numbers? - Raspberry Pi Forums
i expect has been asked before still confused. have pi 2 , if want flash led's on , off pins can use? use actual pin numbers or gpio numbers. example gpio17 pin 11 number goes in python programme? sorry being stupid not want blow up. there loads , loads of info out there tends create confusion, me anyway.
thanks
brian
thanks
brian
welcome confusing part of raspberry pis. pins have 3 numbers , may have fourth name. if turn clock 3 years have been prevented.
http://pi.gadgetoid.com/pinout
have pick one naming system , stick do. choice gpio.board because means can count pins on header (and got stuck before knew better). recommendation use bcm numbering scheme because that's used.
i've printed full page copy of since of rpis have b pinout.
code: select all
root@eagle ~ # gpio readall +-----+-----+---------+------+---+---pi 2---+---+------+---------+-----+-----+ | bcm | wpi | name | mode | v | physical | v | mode | name | wpi | bcm | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | | | 3.3v | | | 1 || 2 | | | 5v | | | | 2 | 8 | sda.1 | alt0 | 1 | 3 || 4 | | | 5v | | | | 3 | 9 | scl.1 | alt0 | 1 | 5 || 6 | | | 0v | | | | 4 | 7 | gpio. 7 | in | 1 | 7 || 8 | 1 | alt0 | txd | 15 | 14 | | | | 0v | | | 9 || 10 | 1 | alt0 | rxd | 16 | 15 | | 17 | 0 | gpio. 0 | in | 0 | 11 || 12 | 0 | in | gpio. 1 | 1 | 18 | | 27 | 2 | gpio. 2 | in | 0 | 13 || 14 | | | 0v | | | | 22 | 3 | gpio. 3 | in | 0 | 15 || 16 | 0 | in | gpio. 4 | 4 | 23 | | | | 3.3v | | | 17 || 18 | 0 | in | gpio. 5 | 5 | 24 | | 10 | 12 | mosi | alt0 | 0 | 19 || 20 | | | 0v | | | | 9 | 13 | miso | alt0 | 0 | 21 || 22 | 0 | in | gpio. 6 | 6 | 25 | | 11 | 14 | sclk | alt0 | 0 | 23 || 24 | 1 | alt0 | ce0 | 10 | 8 | | | | 0v | | | 25 || 26 | 1 | alt0 | ce1 | 11 | 7 | | 0 | 30 | sda.0 | in | 1 | 27 || 28 | 1 | in | scl.0 | 31 | 1 | | 5 | 21 | gpio.21 | in | 1 | 29 || 30 | | | 0v | | | | 6 | 22 | gpio.22 | in | 1 | 31 || 32 | 0 | in | gpio.26 | 26 | 12 | | 13 | 23 | gpio.23 | in | 0 | 33 || 34 | | | 0v | | | | 19 | 24 | gpio.24 | in | 0 | 35 || 36 | 0 | in | gpio.27 | 27 | 16 | | 26 | 25 | gpio.25 | in | 0 | 37 || 38 | 0 | in | gpio.28 | 28 | 20 | | | | 0v | | | 39 || 40 | 0 | in | gpio.29 | 29 | 21 | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | bcm | wpi | name | mode | v | physical | v | mode | name | wpi | bcm | +-----+-----+---------+------+---+---pi 2---+---+------+---------+-----+-----+
have pick one naming system , stick do. choice gpio.board because means can count pins on header (and got stuck before knew better). recommendation use bcm numbering scheme because that's used.
i've printed full page copy of since of rpis have b pinout.
raspberrypi
Comments
Post a Comment