Raspberry Pi GPIO Resource #piday #raspberrypi @Raspberry_Pi

Diagram includes BCM GPIO references (GPIO.BCM), common functions, Header GPIO references, and Pin numbers (GPIO.BOARD)

From Meltwater’s Raspberry Pi Hardware:

Now from using different languages I’ve grown accustomed to using the BCM references for the GPIO pins.  However as some of you may know, these differ slightly between Rev1 and Rev2 of the boards so it is important to ensure you code matches and is easily adapted for the board you are using.

Diagram (above) includes BCM GPIO references (GPIO.BCM), common functions, Header GPIO references, and Pin numbers (GPIO.BOARD). An easy solution is simply to use a define for each and edit the code accordingly.  But for python I’d often heard it suggested to detect the revision of the board, which seems sensible to me.

Well, to test it, I made a simple script. (I did consider using multiple lists, iterating through them and tab formatting into tables etc). Just remember RPi.GPIO will require you to run as a super user (sudo python gpiopins.py)….

Read more.



Try Adafruit's new iPhone & iPad app for makers! Circuit Playground! "Incredibly handy for anyone working in electronics. Perfect for engineers and non-engineers alike."
Looking for engineers, makers and the builders of dreams? Try our Adafruit job boards.
Join our weekly Adafruit SHOW-AND-TELL at 9:30pm ET every Saturday night! Then at 10pm, ASK-AN-ENGINEER with Ladyada and the Adafruit team!

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

www.flickr.com
adafruit's items Go to adafruit's photostream
www.flickr.com
items in Adafruits More in Adafruits pool