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

pigpio Daemon

pigpiod is a utility which launches the pigpio library as a daemon.

Once launched the pigpio library runs in the background accepting commands from the pipe and socket interfaces.

The pigpiod utility requires sudo privileges to launch the library but thereafter the pipe and socket commands may be issued by normal users.

pigpiod accepts the following configuration options

-a valueDMA memory allocation mode0=AUTO, 1=PMAP, 2=MBOXDefault AUTO
-b valueGPIO sample buffer size in milliseconds100-10000Default 120
-c valueLibrary internal settingsDefault 0
-d valuePrimary DMA channel0-14Default 14
-e valueSecondary DMA channel0-14Default 6. Preferably use one of DMA channels 0 to 6 for the secondary channel
-fDisable fifo interfaceDefault enabled
-gRun in foreground (do not fork)Default disabled
-kDisable local and remote socket interfaceDefault enabled
-lDisable remote socket interfaceDefault enabled
-n IP addressAllow IP address to use the socket interfaceName (e.g. paul) or dotted quad (e.g. the -n option is not used all addresses are allowed (unless overridden by the -k or -l options). Multiple -n options are allowed. If -k has been used -n has no effect. If -l has been used only -n localhost has any effect
-p valueSocket port1024-32000Default 8888
-s valueSample rate1, 2, 4, 5, 8, or 10 microsecondsDefault 5
-t valueClock peripheral0=PWM 1=PCMDefault PCM. pigpio uses one or both of PCM and PWM. If PCM is used then PWM is available for audio. If PWM is used then PCM is available for audio. If waves or hardware PWM are used neither PWM nor PCM will be available for audio.
-v -VDisplay pigpio version and exit
-x maskGPIO which may be updatedA 54 bit mask with (1<<n) set if the user may update GPIO #nDefault is the set of user GPIO for the board revision. Use -x -1 to allow all GPIO


sudo pigpiod -s 2 -b 200 -f

Launch the pigpio library with a sample rate of 2 microseconds and a 200 millisecond buffer. Disable the fifo interface.


pigpio provides a rudimentary permissions system for commands issued via the socket and pipe interfaces.

All GPIO may be read.

Only the user GPIO for the board type or those specified by the -x option may be updated.

Type 1 boards 0x03E6CF93 (26 pin header)
Type 2 boards 0xFBC6CF9C (26 pin + 8 pin header)
Type 3 boards 0x0FFFFFFC (40 pin header)

In this context an update includes the following:

GPIO mode set
GPIO pull/up down
GPIO write
GPIO set PWM (including range and frequency)
GPIO set servo

In addition the bank clear and set commands, and the wave commands will only affect updateable GPIO.


The following exceptions are made for particular models.

Models A and B

The green activity LED (GPIO 16) may be written.

Models A+ and B+

The green activity LED (GPIO 47) may be written.
The red power LED (GPIO 35) may be written.
The high USB power mode (GPIO 38) may be written.

Pi Zero

The green activity LED (GPIO 47) may be written.


The green activity LED (GPIO 47) may be written.
The red power LED (GPIO 35) may be written.
The high USB power mode (GPIO 38) may be written.


The green activity LED and the red power LED are not writable.
The USB power mode is fixed at 1.2 amps (high power).

DMA Channels

The secondary channel is only used for the transmission of waves.

If possible use one of channels 0 to 6 for the secondary channel (a full channel).

A full channel only requires one DMA control block regardless of the length of a pulse delay. Channels 7 to 14 (lite channels) require one DMA control block for each 16383 microseconds of delay. I.e. a 10 second pulse delay requires one control block on a full channel and 611 control blocks on a lite channel.

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