Skip to main content
added 440 characters in body
Source Link
joan
  • 71.7k
  • 5
  • 74
  • 107

You probably need to be running Raspbian to use RPi.GPIO as a non-root user, possibly it needs to be jessie as well.

Does /dev/gpiomem exist? If so RPi.GPIO should use this device to access the GPIO. If /dev/gpiomem does not exist try:

sudo rpi-update

to make sure you are using a recent kernel, and

sudo apt-get update
sudo apt-get upgrade

to make sure you are using a recent RPi.GPIO.

You will also need to make sure you are a member of the gpio group:

sudo adduser pi gpio

EDITED TO ADD

The Raspbian system appears to be in a state of flux. I'm not sure if it's a Raspbian or (more likely) a raspberrypi.org problem.

Check that /dev/gpiomem has the correct permissions.

$ ls -l /dev/gpiomem
crw-rw---- 1 root gpio 244, 0 Dec 28 22:51 /dev/gpiomem

If it doesn't then set the correct permissions as follows

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

You probably need to be running Raspbian to use RPi.GPIO as a non-root user, possibly it needs to be jessie as well.

Does /dev/gpiomem exist? If so RPi.GPIO should use this device to access the GPIO. If /dev/gpiomem does not exist try:

sudo rpi-update

to make sure you are using a recent kernel, and

sudo apt-get update
sudo apt-get upgrade

to make sure you are using a recent RPi.GPIO.

You will also need to make sure you are a member of the gpio group:

sudo adduser pi gpio

You probably need to be running Raspbian to use RPi.GPIO as a non-root user, possibly it needs to be jessie as well.

Does /dev/gpiomem exist? If so RPi.GPIO should use this device to access the GPIO. If /dev/gpiomem does not exist try:

sudo rpi-update

to make sure you are using a recent kernel, and

sudo apt-get update
sudo apt-get upgrade

to make sure you are using a recent RPi.GPIO.

You will also need to make sure you are a member of the gpio group:

sudo adduser pi gpio

EDITED TO ADD

The Raspbian system appears to be in a state of flux. I'm not sure if it's a Raspbian or (more likely) a raspberrypi.org problem.

Check that /dev/gpiomem has the correct permissions.

$ ls -l /dev/gpiomem
crw-rw---- 1 root gpio 244, 0 Dec 28 22:51 /dev/gpiomem

If it doesn't then set the correct permissions as follows

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

You probably need to be running Raspbian to use RPi.GPIO as a non-root user, possibly it needs to be jessie as well.

Does /dev/gpiomem/dev/gpiomem exist? If so RPi.GPIO should use this device to access the GPIO. If /dev/gpiomem/dev/gpiomem does not exist try:

sudo rpi-update

to make sure you are using a recent kernel, and

sudo apt-get update
sudo apt-get upgrade

to make sure you are using a recent RPi.GPIO.

You will also need to make sure you are a member of the gpiogpio group:

sudo adduser pi gpio

You probably need to be running Raspbian to use RPi.GPIO as a non-root user, possibly it needs to be jessie as well.

Does /dev/gpiomem exist? If so RPi.GPIO should use this device to access the GPIO. If /dev/gpiomem does not exist try

sudo rpi-update

to make sure you are using a recent kernel, and

sudo apt-get update
sudo apt-get upgrade

to make sure you are using a recent RPi.GPIO.

You will also need to make sure you are a member of the gpio group

sudo adduser pi gpio

You probably need to be running Raspbian to use RPi.GPIO as a non-root user, possibly it needs to be jessie as well.

Does /dev/gpiomem exist? If so RPi.GPIO should use this device to access the GPIO. If /dev/gpiomem does not exist try:

sudo rpi-update

to make sure you are using a recent kernel, and

sudo apt-get update
sudo apt-get upgrade

to make sure you are using a recent RPi.GPIO.

You will also need to make sure you are a member of the gpio group:

sudo adduser pi gpio
Source Link
joan
  • 71.7k
  • 5
  • 74
  • 107

You probably need to be running Raspbian to use RPi.GPIO as a non-root user, possibly it needs to be jessie as well.

Does /dev/gpiomem exist? If so RPi.GPIO should use this device to access the GPIO. If /dev/gpiomem does not exist try

sudo rpi-update

to make sure you are using a recent kernel, and

sudo apt-get update
sudo apt-get upgrade

to make sure you are using a recent RPi.GPIO.

You will also need to make sure you are a member of the gpio group

sudo adduser pi gpio