Raspberry pinouts - BCM/BOARD/wiringPi
If you are going to connect some electronics to your Raspberry, no matter if to power them, control them or read dat from them, you will need to use Raspberry’s pinouts, which are those small wires going out of the raspberry in the corner. There are more versions of Raspberry (A, B, A and B in revision 2.0, A+,B+,2B,3B and som) and they vary in number and placement of their pinouts. Namely version A & B have 26 pinouts and all others have 40. Each A, B and the rest have different layout of their pins, so there are 3 variations in total. Let’s have a look at them!
RPi B revision 1
RPi A/B revision 2
credits for images go to RaspberryPi Spy
If you are going to control something with your Raspberry or read data from a sensor lets say, you will need a general purpose input/output to conect it to. These pins - GPIO in short - can be set to OUTPUT or INPUT mode. In OUTPUT mode you can read HIGH or LOW (eg. 1 or 0) values on the pin depending if you brings 3.3V voltage on it for HIGH, respectively 0V for LOW. In reverse, if you set GPIO to INPUT mode, you can set it to HIGH, which means the pin will be source of 3.3V or to LOW, which means it will give you 0V.
BOARD vs. BCM vs. wiringPi
You might have noticed, that each pin has a number, but also a label, which in GPIO’s case also contains number different from the actual pin number. You always have to bare in mind, which pin numbering you are using! Those numbers on pins are reffered to as BOARD numbering, numbers mentioned in labels reffer to BCM numbering. To make it even more confusing, there is another numbering called wiringPi used in command-line utility
gpio which we will have a look at in next article. This utility offers an option to print all pin numbers with all their different numbering. So either write
in your Raspberry terminal or have a look at this screen to see all the numberings together. BCM goes for BCM, wPi goes for wiringPi and Physical goes for BOARD.
Now finally, put this blog post to your favourites bar, cause you will come back here quite often before you remember the numbers by heart…