Questions tagged [pigpio]

pigpio is a library for accessing GPIO pins as well as other functions including I2C. pigpio has a client-server architecture , which enables you to remotely control GPIO pins.

Pigpio is a library for accessing GPIO pins as well as other functions including I2C. The home page for Pigpio is http://abyz.me.uk/rpi/pigpio/index.html.

Please Note!

If you are not aware, there are a number of different pieces of software that serve a similar fundamental purpose (controlling the Raspberry Pi GPIO pins) and are independent of one another. Not surprisingly, they also all use spins on combining "rpi" and "gpio" in their name. Each has a separate tag and questions about their use should use that specific tag. This is documented here to prevent confusion.

  • The page you are on now is for the pigpio library, written in C but with ports to python and other languages: Tag
  • The RPi.GPIO module for python: Tag
  • The pi-gpio library, for node.js (javascript): Tag

This isn't intented as an exhaustive list of such software, just the three most prone to confusion here due to the similar names perhaps made more similiar by restrictions on tag labels (all lower case, etc).

321 questions
13
votes
2 answers

pigpio Can't lock /var/run/pigpio.pid

Trying to run the pigpio example program freq_count_1 I get the error Can't lock /var/run/pigpio.pid. The gpiotest program, however, runs as expected. Below you can see what I did. I have a Raspberry Pi 2 running Jessie. gcc -Wall -pthread -o…
user37342
  • 191
  • 1
  • 1
  • 4
5
votes
1 answer

How does pigpio's wave_chain() method happen in hardware?

The Python package pigpio has a wave_chain() method that allows one to chain together a series of waveforms in an easy-to define looping structure. But the GPIO chip itself has quite a limited number of 32-byte registers. Is the CPU executing this…
uhoh
  • 562
  • 5
  • 18
3
votes
0 answers

How to use pigpio to control 3 stepper motors with drivers

I need to control 3 independent stepper motors with stepper motor drivers using RPi. Driver of each motor requires STEP pulse to make one step (let's not bother about DIR and ENABLE signals for now). Basic goals: slowly accelerate (with a ramp of…
Oleg
  • 31
  • 3
3
votes
1 answer

2 pigpio programs at the same time

I've made some programs with the pigpio library, all of them are working well, but when I try to run 2 at the same time I get this error (For the second one). initInitialise: Can't lock /var/run/pigpio.pid. I know that the first one is acting like a…
Neto
  • 31
  • 2
3
votes
1 answer

Segmentation faults on every GPIO STR

I am stuck and hoping for a clue. These lines seem to show the issue. It is for a Pi4. .equ IOBASE, 0x7E200000 .equ GPFSEL2, 0x08 //offset to reg for IO Pins 20 - 29 .align 4 LDR R0, =IOBASE //skip read modify write for now, just set the…
Sarge
  • 31
  • 3
2
votes
1 answer

Does pigpiod feature a verbose / debug mode?

As I'm currently trying to debug an issue with my SPI link, which is addressed through pigpio, I'd like to make pigpiod write warnings and debug messages (if such occur) to stderr.
Neppomuk
  • 452
  • 4
  • 16
2
votes
1 answer

Sending new wave to pigpiod causes Pi to "lock up"

I'm running pigpiod on the Pi, with a Windows PC using the pigpio Python module. I create a connection to the Pi with pigpio.pi() and then send the wave repeat command to create a straightforward frequency output. When I need to change the frequency…
Rich
  • 75
  • 7
2
votes
1 answer

pigpio returns -999.00 from pin 18

Thanks to this forum, I was able to successfully use the PIGPIO library to get my DHT22 sensor to work. My next requirement is to attach an RTC chip and it seems to use pin 4, which works for my PIGPIO. Reading around, the DHT22 can use pin 18,…
sam452
  • 155
  • 4
2
votes
0 answers

Problem with PI GPIO using BB SPI

I've developed a PI Python application to replace an old control card which sent bit banging out to daisy chained LED drivers. It all works fine except when I need some fast updating of the LED's. Currently I'm using bit banging on SPI. Having…
Peter
  • 21
  • 2
1
vote
1 answer

When switching to pigpiod, which replacement shall I use for gpioSetTimerFunc()?

When still using the pigpio API "directly", I made extensive use of the gpioSetTimerFunc function, just like this: gpioSetTimerFunc (4, 500, OnRDSDataTimerElapsed); After making pigpiod do all the GPIO-related work, I have to replace all pigpio…
Neppomuk
  • 452
  • 4
  • 16
1
vote
1 answer

Ubuntu 17.04- can't find pigpiod

On a non Raspberry Pi (just an ordinary laptop, installed with 17.04) - I'm trying to run a Python script to control Pi's Remote GPIO, with no success. pigpio module is installed as ordered in pigpio library.Installation was OK, and files are…
guyd
  • 578
  • 3
  • 13
  • 28
1
vote
1 answer

How to stop pigpio daemon from running at system start

I wish to use the pigpio C library which requires that the daemon is not running. My application will be in an embedded standalone system and I cannot therefore kill the daemon.
rdig
  • 11
  • 1
  • 3
1
vote
2 answers

Pigpio initialization failing with init mbox zaps failed

I have been writing some pigpio apps and all of a sudden, they all start to fail. The error I get is: initMboxBlock: init mbox zaps failed The error is thrown from calls to gpioInitialise() My next step is to see if rebooting helps but I am hoping…
Kolban
  • 1,784
  • 2
  • 16
  • 28
1
vote
2 answers

building piscope on Raspberry Pi OS 64 bit

I have used piscope on Raspberry Pi OS and recently wanted to use on Raspberry Pi OS 64bit. I followed the instructions on http://abyz.me.uk/rpi/pigpio/piscope.html # To utilise a pre-built executable use one of the following make commands make hf …
Milliways
  • 59,890
  • 31
  • 101
  • 209
1
vote
1 answer

c++ pigpio i2c function question

I have a several questions regarding pigpio I2C functions as below. how to check if a I2C device is connected with pigpio? I would like to just check if a device is connected without read/write operation. i could implement the same feature with…
1
2 3