Closed RankoR closed 1 year ago
pigpio when loaded as a shared library requires root access unfortunately. You can run using the sockets interface if need be. Note native PWM works with the built in device factory on 2 pins - I assume you need more than 2.
Hi, I'm trying to use your library with pigpio for native PWM support on Pi 4 B:
Linux raspberrypi 6.1.34-v8+ #1657 SMP PREEMPT Fri Jun 16 12:36:29 BST 2023 aarch64 GNU/Linux
.My user is in the
gpio
group:uid=1000(rankor) gid=1000(rankor) groups=1000(rankor),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),104(input),106(render),108(netdev),995(docker),997(gpio),998(i2c),999(spi)
/dev/gpiomem
has correct permissions:crw-rw---- 1 root gpio 245, 0 Jun 20 01:17 /dev/gpiomem
.When I'm trying to run my program without root permissions, it fails to initialize PiGPIO:
But when I run it with
sudo
, it works fine.I prefer not to run programs as root when possible. Is there a way to run it as a usual user?