pigpiod(1)
๐ pigpiod(1) โ the pigpio archive's own daemon starter ๐
okay so bestie, welcome to the pigpio archive manual page for pigpiod ๐
โจ NAME โจ
pigpiod โ a utility to start the pigpio library as a daemon. periodt.
๐ธ SYNOPSIS ๐ธ
sudo pigpiod [OPTION]...
๐ฆ DESCRIPTION ๐ฆ
okay so pigpiod is a utility which launches the pigpio library as a daemon. iconic behavior honestly ๐
Once launched, the pigpio library runs in the background accepting commands from the pipe and socket interfaces. it's literally just vibing back there, doing its thing ๐ซถ
The pigpiod utility requires sudo privileges to launch the library โ yes, bestie, you need sudo โ but thereafter the pipe and socket commands may be issued by normal users. so like, only the launch is main character energy; after that everyone can hang ๐
pigpiod accepts the following configuration options, and ngl there are a LOT of them, so buckle up ๐
โจ OPTIONS โจ
-a valueโ DMA memory allocation mode.0=AUTO,1=PMAP,2=MBOX. Default isAUTO. pick your fighter ๐-b valueโ GPIO sample buffer size in milliseconds. range is100-10000. Default is120. it's giving "how much tea to hold in the buffer" ๐-c valueโ Library internal settings. Default is0. mysterious. iykyk ๐-d valueโ Primary DMA channel. range is0-14. Default is14. the headliner channel โญ-e valueโ Secondary DMA channel. range is0-14. Default is6. Preferably use one of DMA channels0to6for the secondary channel. noted, bestie ๐-fโ Disable fifo interface. Default enabled. bye fifo ๐-gโ Run in foreground (do not fork). Default disabled. no forking around ๐ง-kโ Disable local and remote socket interface. Default enabled. no sockets for you ๐-lโ Disable remote socket interface. Default enabled. remote? blocked ๐ซ-mโ Disable alerts (sampling). Default enabled. no sampling, no problem ๐-n IP addressโ Allow IP address to use the socket interface. Name (e.g.paul) or dotted quad (e.g.192.168.1.66). If the-noption is not used all addresses are allowed (unless overridden by the-kor-loptions). Multiple-noptions are allowed. If-khas been used-nhas no effect. If-lhas been used only-n localhosthas any effect. so many rules but ok we respect the boundaries ๐ซก-p valueโ Socket port. range is1024-32000. Default is8888. port glow-up โจ-s valueโ Sample rate.1,2,4,5,8, or10microseconds. Default is5. choose your speed, bestie โก-t valueโ Clock peripheral.0=PWM1=PCM. Default isPCM. 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. this is the drama triangle of audio peripherals tbh ๐ญ-v,-Vโ Display pigpio version and exit. "who am i? why am i here?" and then it exits ๐-x maskโ GPIO which may be updated. A 54 bit mask with(1<<n)set if the user may update GPIO #n. Default is the set of user GPIO for the board revision. Use-x -1to allow all GPIO. mask moment ๐
๐ Example ๐
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. a little starter pack, slay โจ
๐ Permissions ๐
pigpio provides a rudimentary permissions system for commands issued via the socket and pipe interfaces. it's giving "we have a bouncer at the door" ๐ช
All GPIO may be read. read all the things! ๐
Only the user GPIO for the board type or those specified by the -x option may be updated. writing is a privilege, not a right, bestie โ
- 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. so like, the waves know their lane ๐
๐ฆ Exceptions ๐ฆ
The following exceptions are made for particular models. special little snowflakes, every one of them ๐ฅน
Models A and B
The green activity LED (GPIO 16) may be written. blink blink ๐
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.
three in one, we love a multitasker ๐
Pi Zero
The green activity LED (GPIO 47) may be written. tiny but mighty ๐ง
Pi2B
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.
same energy as the A+/B+, we see you ๐
Pi3B
The green activity LED and the red power LED are not writable. no LEDs for you, sorry bestie ๐ญ The USB power mode is fixed at 1.2 amps (high power). fixed, locked, no notes ๐
โก DMA Channels โก
The secondary channel is only used for the transmission of waves. waves only, no small talk ๐
If possible use one of channels 0 to 6 for the secondary channel (a full channel). trust us on this one ๐
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. that's a LOT of control blocks, bestie โ math doesn't lie ๐งฎ
๐ SEE ALSO ๐
pig2vcd(1), pigs(1), pigpio(3), pigpiod_if(3), pigpiod_if2(3) โ the whole friend group ๐ซถ
๐ธ AUTHOR ๐ธ
joan@abyz.me.uk โ the icon, the legend, the author ๐
written from the Linux corner of the universe, circa 2012-2020, for pigpiod(1) โ that's the vibe, that's the date, that's the source, periodt ๐โจ
๐ฆ where this page comes from
- nixos 26.05: pigpio 79
- nixpkgs unstable: pigpio 79
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms