La libreria wiringPi.h es muy util para controlar las entradas y salidas de la Raspberry pi desde programas en C o C++.

Además esta librería es muy similar a la libreria wiring del ardruino con lo que podremos imprtar librerias entre estos dos sistemas.

 

La instalacion se hace:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git-core

 

después descargamos la última versión o esta copia.

 git clone git://git.drogon.net/wiringPi

 y procedemos a instalarlo:

cd wiringPi
./build

 El resultado sera algo parecido a esto:

wiringPi Build script
=====================


WiringPi Library
[UnInstall]
[Compile] wiringPi.c
[Compile] wiringSerial.c
[Compile] wiringShift.c
[Compile] piHiPri.c
[Compile] piThread.c
[Compile] wiringPiSPI.c
[Compile] wiringPiI2C.c
[Compile] softPwm.c
[Compile] softTone.c
[Compile] mcp23008.c
[Compile] mcp23016.c
[Compile] mcp23017.c
[Compile] mcp23s08.c
[Compile] mcp23s17.c
[Compile] sr595.c
[Compile] pcf8574.c
[Compile] pcf8591.c
[Compile] mcp3002.c
[Compile] mcp3004.c
[Compile] mcp4802.c
[Compile] mcp3422.c
[Compile] max31855.c
[Compile] max5322.c
[Compile] sn3218.c
[Compile] drcSerial.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]

WiringPi Devices Library
[UnInstall]
[Compile] ds1302.c
[Compile] maxdetect.c
[Compile] piNes.c
[Compile] gertboard.c
[Compile] piFace.c
[Compile] lcd128x64.c
[Compile] lcd.c
[Compile] piGlow.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]

GPIO Utility
[Compile] gpio.c
gpio.c:85:12: warning: ‘decodePin’ defined but not used [-Wunused-function]
[Compile] extensions.c
[Compile] readall.c
[Link]
[Install]

All Done.

NOTE: This is wiringPi v2, and if you need to use the lcd, Piface,
  Gertboard, MaxDetext, etc. routines then you must change your
  compile scripts to add -lwiringPiDev