Data Sheet

UCTRONICS Ultimate Starter Leaning Kit for Raspberry Pi #K0064
46 www.uctronics.com
5. Raspberry Pi GPIO Library Introduction
Currently, there are two major GPIO libraries for Raspberry Pi, RPi.GPIO and wiring Pi.
RPi.GPIO:
RPi.GPIO is a python module to control Raspberry Pi GPIO channels. For more information
about RPi.GPIO, please visit:
https://pypi.python.org/pypi/RPi.GPIO/
For examples and documentation, please visit:
http://sourceforge.net/p/raspberry-gpio-python/wiki/Home/
The RPi.GPIO module is pre-installed in the official Raspbian operating system, you can use it
directly.
wiringPi:
The wiringPi is a GPIO access library written in C for the BCM2835/6 SOC used in the
Raspberry Pi. It’s released under the GNU LGPLv3 license and is usable from C and C++
and many other languages with suitable wrappers. It’s designed to be familiar to people
who have used the Raspberry Pi “wiring system. For more information about wiringPi,
please visit : http://wiringpi.com/
Install wiringPi:
Step 1 : Get the source code
$ git clone git://git.drogon.net/wiringPi
Step 2 : Compile and install
$ cd wiringPi
$ git pull origin
$ sudo ./build
Press Enter, the script “build will automatically compile wiringPi source code and then
install it to the Raspberry Pi.
Next, verify whether the wiringPi is installed successfully or not:
wiringPi
includes a command-line utility gpio which can be used to program and setup the
GPIO pins. You can use this to read and write the pins and even use it to control them from
shell scripts.