Pibrella
+Pinout!
+The comprehensive Raspberry Pi Pinout guide for the Raspberry Pi, now with Model B+ and Pi 2
+Pinout isn't meant to be printable, but it's a great quick-reference and a comprehensive starter guide to learning about your Raspberry Pi's GPIO pins.
+What do these numbers mean, anyway?
+-
+
- BCM - Broadcom pin number, these are the ones you probably want to use with RPi.GPIO +
- WiringPi - Wiring Pi pin number, for Gordon's Wiring Pi library +
- Physical - Number corresponding to the pins physical location on the header +
Pi 2+
+To celebrate the launch of the Pi 2 and the new Pi-enthusiasts it'll bring, Pinout has been updated to be cleaner, more comprehensive and more accurate.
+Model B+
+Now that the Raspberry Pi Model B Plus is here, I've updated Pinout with the 14 extra pins you'll find on your shiny new board.
+Note: While I've placed a gap to visually separate the additional 14 pins on the B+, you wont find this gap on the actual board!
Pibrella
The all-in-one light, sound, input and output add-on board from Pimoroni vs Cyntech uses lots of IO on the Pi but leaves both Serial and I2C free leaving plenty of room for expansion if you get creative.
Pibrella is easy to use, first you should install the module using LXTerminal/Command Line:
-sudo apt-get install python-pip
-sudo pip install pibrella
-
+sudo apt-get install python-pip
+sudo pip install pibrella
+
Then import it into your Python script and start tinkering:
-import pibrella
-pibrella.light.red.on()
import pibrella
+pibrella.light.red.on()
+
+3v3 Power
- Physical pin 1
The 3v3, 3.3 volt, supply pin on the Pi has a max available current of about 50 mA. Enough to power a couple of LEDs or a microprocessor, but not much more.
+You should generally use the 5v supply, coupled with a 3v3 regulator for 3.3v projects.
5v Power
- Physical pin 2
The 5v power pins are connected directly to the Pi's power input and will capably provide the full current of your mains adaptor, less that used by the Pi itself.
+With a decent power supply, such as the official Pi adaptor, you can expect to pull about 1.5A.
+Don't be disuaded by what sounds like a measly low voltage. You can do a lot with 5v. Power Arduinos, and even run a small Electroluminescent wire inverter right off the 5v pin!
BCM 2 (SDA)
- Physical pin 3
- BCM pin 2
- Wiring Pi pin 8
- BCM pin 0 on Rev 1 ( very early ) Pi
It's easy to get started writing a digital HIGH or LOW to a GPIO pin, but you've got to remember a few things:
+-
+
- Run your script as root +
- Set your pin's mode to OUTPUT (1) +
Assuming you've installed WiringPi2-Python ( pip install wiringpi2 ) then try pasting the following into a .py file:
+import wiringpi2 as wiringpi
+HIGH = 1
+LOW = 0
+OUTPUT = 1
+INPUT = 0
+wiringpi.wiringPiSetup()
+wiringpi.pinMode(8,OUTPUT)
+wiringpi.digitalWrite(8,HIGH)
+
+
+Then run it with:
+sudo python myscript.py
+
5v Power
- Physical pin 4
The 5v power pins are connected directly to the Pi's power input and will capably provide the full current of your mains adaptor, less that used by the Pi itself.
+With a decent power supply, such as the official Pi adaptor, you can expect to pull about 1.5A.
+Don't be disuaded by what sounds like a measly low voltage. You can do a lot with 5v. Power Arduinos, and even run a small Electroluminescent wire inverter right off the 5v pin!
BCM 3 (SCL)
- Physical pin 5
- BCM pin 3
- Wiring Pi pin 9
- BCM pin 1 on Rev 1 ( very early ) Pi
require 'wiringpi2'
+HIGH = 1
+LOW = 0
+OUTPUT = 1
+INPUT = 0
+io = WiringPi::GPIO.new
+io.pin_mode(9,OUTPUT)
+io.digital_write(9,HIGH)
+
Ground
- Physical pin 6
Ground!
BCM 4 (GPCLK0)
- Physical pin 7
- BCM pin 4
- Wiring Pi pin 7
BCM 14 (TXD)
- Physical pin 8
- BCM pin 14
- Wiring Pi pin 15
Ground
- Physical pin 9
Ground!
BCM 15 (RXD)
- Physical pin 10
- BCM pin 15
- Wiring Pi pin 16
BCM 17
- Physical pin 11
- BCM pin 17
- Wiring Pi pin 0
BCM 18 (PCM_C)
- Physical pin 12
- BCM pin 18
- Wiring Pi pin 1
BCM 27 (PCM_D)
- Physical pin 13
- BCM pin 27
- Wiring Pi pin 2
- BCM pin 21 on Rev 1 ( very early ) Pi
Ground
- Physical pin 14
Ground!
BCM 22
- Physical pin 15
- BCM pin 22
- Wiring Pi pin 3
BCM 23
- Physical pin 16
- BCM pin 23
- Wiring Pi pin 4
3v3 Power
- Physical pin 17
BCM 24
- Physical pin 18
- BCM pin 24
- Wiring Pi pin 5
BCM 10 (MOSI)
- Physical pin 19
- BCM pin 10
- Wiring Pi pin 12
Ground
- Physical pin 20
Ground!
BCM 9 (MISO)
- Physical pin 21
- BCM pin 9
- Wiring Pi pin 13
BCM 25
- Physical pin 22
- BCM pin 25
- Wiring Pi pin 6
BCM 11 (SCKL)
- Physical pin 23
- BCM pin 11
- Wiring Pi pin 14
BCM 8 (CE0)
- Physical pin 24
- BCM pin 8
- Wiring Pi pin 10
Ground
- Physical pin 25
Ground!
BCM 7 (CE1)
- Physical pin 26
- BCM pin 7
- Wiring Pi pin 11
ID_SD
- Physical pin 27
ID_SC
- Physical pin 28
BCM 5
- Physical pin 29
- BCM pin 5
- Wiring Pi pin 0
Ground
- Physical pin 30
Ground!
BCM 6
- Physical pin 31
- BCM pin 6
- Wiring Pi pin 0
BCM 12
- Physical pin 32
- BCM pin 12
- Wiring Pi pin 0
BCM 13
- Physical pin 33
- BCM pin 13
- Wiring Pi pin 0
Ground
- Physical pin 34
Ground!
BCM 19 (MISO)
- Physical pin 35
- BCM pin 19
- Wiring Pi pin 0
BCM 16
- Physical pin 36
- BCM pin 16
- Wiring Pi pin 0
BCM 26
- Physical pin 37
- BCM pin 26
- Wiring Pi pin 0
BCM 20 (MOSI)
- Physical pin 38
- BCM pin 20
- Wiring Pi pin 0
Ground
- Physical pin 39
Ground!
BCM 21 (SCLK)
- Physical pin 40
- BCM pin 21
- Wiring Pi pin 0