pigpio library
pigpio pigpio C I/F pigpiod pigpiod C I/F Python pigs piscope Misc Examples Download FAQ 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 (V71)

Method 1

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

Method 2

rm pigpio.tar
sudo rm -rf PIGPIO
wget abyz.me.uk/rpi/pigpio/pigpio.tar
tar xf pigpio.tar
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
sudo make install

If the Python install fails it may be because you need the setup tools.

sudo apt install python-setuptools python3-setuptools

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| |FAQ| |Site Map|
© 2012-2019
e-mail: pigpio @ abyz.me.uk
Updated: 15/08/2019