Raspberry Pi GPIO Pinout

I found these awesome Raspberry Pi pinout diagrams by Pighixxx at Flickr.

When I am trying to learn something new, I make my own diagrams.

I have been doing some reading about safely connecting things to the GPIO pins of the Raspberry Pi, especially regarding Voltage and Amps. It is not as simple as one would think, considering all the hype about a beginner being able to learn Programming and Electronics with a Raspberry Pi. The main thing I have learned, so far, is: Raspberry Pi GPIO Pinout

A maximum of 16mA per pin with the total current from all pins not exceeding 51 mA.

~ Understanding Outputs by Mike Cook

So doing some simple arithmetic, I can use all 17 GPIO pins, if the current on each pin is not more than 3mA (17 * 3 = 51). If only one pin is used, then it can handle a maximum of 16mA.

There are all sorts of other caveats as well. GPIO pins may be permanently damaged if things are wired wrong. That is scary. I am going to have to be extremely careful. The bywords for learning Electronics on a Raspberry Pi are going to be Check, Double Check, and Triple Check all circuits before applying power.

Having said all that, I was determined to STEAM ahead and try to do a Hello World Blinking LED circuit, using the GPIO pins of my Raspberry Pi computer. I wired it up using a 170-hole mini-breadboard, a couple of male-to-female jumper wires, a 1K Ohm resistor (brown, black, red), and a 3mm Red LED. I hooked the Ground Pin 9 to the cathode of the Red LED. The other lead of the LED connected to one lead of the 1K Ohm resistor. The other lead of the resistor connected to GPIO Pin 27.

I had to download some files to my Raspberry Pi before I could continue. I used the apt-get utility.
# apt-get update
# apt-get install python-dev
# apt-get install python-rpi.gpio
Once that was completed, I opened an editor and typed in this source code, modified from an example in The Raspberry Pi Cookbook by Simon Monk: Raspberry Pi GPIO Pinout schematic

# run as superuser
# #python led_blink.py
import RPi.GPIO as GPIO
import time
GPIO.setup(27, GPIO.OUT)
while (True):
  GPIO.output(27, True)
  GPIO.output(27, False)
# Ctrl-C to quit

When I executed the Python script, the Red LED blinked. Hello, World !


For more detail: Raspberry Pi GPIO Pinout

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top