0

I’m trying to change pin mode on RPI (with Raspbian) – it works when I invoke those commands

sudo chown root.gpio /dev/gpiomem
sudo chmod g+rw /dev/gpiomem

but after every restart I have to execute them because without this I have this error:

“Setting a mode to a pin requires root permissions. ---> System.UnauthorizedAccessException: Access to the path '/sys/class/gpio/gpio21/direction' is denied. ---> System.IO.IOException: Permission denied”

How can I persist those permissions?

Ingo
  • 42,961
  • 20
  • 87
  • 207
dnf
  • 101
  • 1

0 Answers0