Skip to main content

Posts

Showing posts with the label gpio

Raspi GPIO Python error

Raspi GPIO Python error Strange: the Raspi GPIO Python module (http://pypi.python.org/ pypi/RPi.GPIO/0.2.0) gives an error when I try to use it as a normal user. Workaround is to run Python as root ... Error when using as a normal user: pi@raspberrypi ~ $ python  Python 2.7.3rc2 (default, Apr 23 2012, 04:52:06)  [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import RPi.GPIO as GPIO >>> GPIO.setup(11, GPIO.IN) Traceback (most recent call last):   File " ", line 1, in   File "/usr/local/lib/python2.7/dist-packages/RPi.GPIO-0.2.0-py2.7.egg/RPi/GPIO/__init__.py", line 102, in setup     with open(/sys/class/gpio/export, w) as f: IOError: [Errno 13] Permission denied: /sys/class/gpio/export >>>  Ugly workaround: pi@raspberrypi ~ $ sudo python  Python 2.7.3rc2 (default, Apr 23 2012, 04:52:06)  [GCC 4.6.3] on linux2 Type "help", "copyright...