Hardware Reference
In-Depth Information
The leter P1 shown in the following image corresponds to P1-1 of the GPIO map. P1-1
corresponds to the first pin on the left in the front row, while P1-2 corresponds to the first
pin on the left in the back row.
The Raspberry Pi GPIO peripheral
In this topic, we will be mostly using Python programming language. Python is a very simple
and easy language to learn. We may wander of to other programming languages from ime
to ime, but we will mostly sick to Python. With this in mind, let's get started.
Installing GPIO libraries
There are a lot of libraries available to access the GPIO peripheral. The easiest to install and
use is the quick2wire python API . The API is used to control the GPIO peripherals and I2C
devices connected to the Raspberry Pi.
There are different libraries such as the RPi.GPIO, Pi4J, and so on.
We are using the quick2wire API in this example as a beginner
might find it easy to use. You are welcome to use other libraries of
your choice. The quick2wire-gpio-admin tool enables controlling
the GPIO pins without root access.
One disadvantage of using the quick2wire module is that it
provides access only to GPIO pins 0 through 7.
 
Search WWH ::




Custom Search