pigpio library
pigpio pigpio C I/F pigpiod pigpiod C I/F Python pigs piscope Misc Examples Download Site Map

Download & Install

Remove or rename any existing pigpio zip or tar files depending on your download method.  Remove or rename any existing PIGPIO or pigpio-master directory (saving any of your own files in that directory first).

If the pigpio daemon is running it should be killed (sudo killall pigpiod) before make install and restarted afterwards (sudo pigpiod).

The initial part of the make, the compilation of pigpio.c, takes 100 seconds on early model Pis.  Be patient.  The overall install takes just over 3 minutes.

Download and install (V56)

Method 1

rm pigpio.zip
sudo rm -rf PIGPIO
wget abyz.co.uk/rpi/pigpio/pigpio.zip
unzip pigpio.zip
make -j4
sudo make install

Method 2

rm pigpio.tar
sudo rm -rf PIGPIO
wget abyz.co.uk/rpi/pigpio/pigpio.tar
tar xf pigpio.tar
make -j4
sudo make install

Method 3

rm master.zip
sudo rm -rf pigpio-master
wget https://github.com/joan2937/pigpio/archive/master.zip
unzip master.zip
cd pigpio-master
make -j4
sudo make install

To check the library

These tests make extensive use of GPIO 25 (pin 22).  Make sure nothing, or only a LED, is connected to the GPIO before running the tests.  Most tests are statistical in nature and so may on occasion fail.  Repeated failures on the same test or many failures in a group of tests indicate a problem.

sudo ./x_pigpio # check C I/F

sudo pigpiod    # start daemon

./x_pigpiod_if2 # check C      I/F to daemon
./x_pigpio.py   # check Python I/F to daemon
./x_pigs        # check pigs   I/F to daemon
./x_pipe        # check pipe   I/F to daemon

To compile, link, and run a C program

gcc -Wall -pthread -o foobar foobar.c -lpigpio -lrt
sudo ./foobar

To start the pigpio daemon

sudo pigpiod

To stop the pigpio daemon

sudo killall pigpiod


git clone https://github.com/joan2937/pigpio

Raspbian (raspberrypi.org image)

This may not be the most recent version.  You can check the version with the command pigpiod -v.

sudo apt-get update
sudo apt-get install pigpio python-pigpio python3-pigpio

|pigpio| |pigpio C I/F| |pigpiod| |pigpiod C I/F| |Python| |pigs| |piscope| |Misc| |Examples| |Download| |Site Map|
© 2012-2016
e-mail: pigpio @ abyz.co.uk
Updated: 22/09/2016