Trying to use GPIO in Python, but it only works if I change to root. Why? The description for GPIO Ver 0.6.2 indicates that root is no longer needed?

  • 1
    Could you edit your question and add the output of cat /etc/os-release and uname -a?
    – joan
    May 22, 2016 at 6:06
  • 1
    look here: raspberrypi.stackexchange.com/questions/40105/…, I think you need to change the access rights to /dev/mem
    – lexu
    May 22, 2016 at 9:06
  • @lexu To use RPi.GPIO without being root /dev/gpiomem needs to exist with the correct permissions and the user (default pi) needs to be a member of group gpio.
    – joan
    May 22, 2016 at 10:09
  • This solves the immediate problem but it must be redone after a reboot, how can it be done to survive a reboot?
    – user46915
    May 24, 2016 at 1:30


Browse other questions tagged or ask your own question.