Raspberry Pi – using WiringPi • Russwurm

What is WiringPi?

WiringPi is a very useful interface library to use the raspberry GPIO (general purpose input/output). More info available at Wiring Pi Home Page

How to install WiringPi

Installation is pretty straight forward; just follow these steps to get and compile it:

sudo apt-get install git-core
git clone git://git.drogon.net/wiringPi
cd wiringPi
gpio -v

Now the library is installed at /usr/local/bin and is ready to use.

Some basic testing with WiringPi

Let’s do some basic testing to see if a GPIO pin is doing what we expect.

gpio -1 mode 26 out # set pin 26 as output
gpio -1 write 26 1 # turn on the output
gpio -1 write 26 0 # turn off the output