knute
Posts: 550
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

pigpio?

Thu Jul 25, 2019 10:08 pm

Is it possible to run two programs using the pigpio libraries at the same time? I'm getting an error that leads me to think that isn't possible.

2019-07-25 17:05:21 initInitialise: Can't lock /var/run/pigpio.pid

Thanks!

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: pigpio?

Thu Jul 25, 2019 10:27 pm

Only one version of the library can be running at a time.

If you create a C program and link with -lpigpio that program will become the pigpio daemon when run. Other programs will have to talk via the daemon interface.

For Python that is handled by importing the pigpio module. A C program needs to use the pigpiod_if2 interface.

http://abyz.me.uk/rpi/pigpio/pdif2.html
Last edited by joan on Fri Jul 26, 2019 3:52 pm, edited 1 time in total.

knute
Posts: 550
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: pigpio?

Fri Jul 26, 2019 3:08 pm

Thanks Joan!

Return to “Troubleshooting”