Hi.. I am using pigpio module for LED pwm in RGB led strip. But I am unable to run it without sudo i.e. as root.. so if there is any way i can use it without root permission. as it give me try running as root . precede the command with 'sudo' error.
I have also tried running 'sudo pigpiod' to start the daemon. but got the same result.
Thanks in advance.
-Bansari
Re: Unable to access pigpio without sudo.
You need to use sudo to start the pigpio daemon (sudo pigpiod) or run a program linked against the pigpio library.
You do not need sudo to run a pigpio Python script or to run a program linked against the pigpiod_if library (both of which use the services of the running pigpio daemon).
You do not need sudo to run a pigpio Python script or to run a program linked against the pigpiod_if library (both of which use the services of the running pigpio daemon).
Re: Unable to access pigpio without sudo.
joan - I'm in need of your advice. My C application uses PIGPIO to access GPIO pins and the SPI bus. It also uses SDL2 to output audio. When running as root, USB audio devices fail to open, but the bcm2835 PWM audio driver still works. Is there any way to use your library for GPIO/SPI without having to have my program run as root?
The fastest code is none at all 

Re: Unable to access pigpio without sudo.
As a follow-up to my own post, I discovered a way to make it work. The USB audio adapter I'm using doesn't work when the calling program has root privilege. The way around this is to give the executable root privilege, but run it as user. To give an executable root privilege:
sudo chown root:root my_program
sudo chmod 4755 my_program
This allows PIGPIO to run as root, but creating threads with pthread that run as user.
sudo chown root:root my_program
sudo chmod 4755 my_program
This allows PIGPIO to run as root, but creating threads with pthread that run as user.
The fastest code is none at all 
