SimpleSi Posted July 8, 2012 Posted July 8, 2012 I want a blinking LED! downloaded FPi.GPIO-0.2.0.tar.gz and think I sucessfully installed it run python 2.6 from menu and import RPi.GPIO as GPIO give no error but GPIO.setup(11, GPIO.OUT) gives Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.6/dist-packages/RPi.GPIO-0.2.0-py2.6.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' Anyone had this and what's the cure? Also what physical pin does pythons 11 map to - is it Pin 3 on the PI GPIO strip (e.g GPIO on the right,2nd pin down on left side pins)??? Si
Steve21 Posted July 8, 2012 Posted July 8, 2012 What OS you running it on currently? Will probably need dialout permissions if it's not runnig under sudo etc. Steve
teejay Posted July 8, 2012 Posted July 8, 2012 Need to start python as root to use the GPIO, so do sudo python first. Haven't figured out a way round that yet but I'm still pretty much a noob at this
Steve21 Posted July 8, 2012 Posted July 8, 2012 You'll have to double check, as I haven't played with the Pi yet, but in terms of pure apache to debian etc. Normally it runs it under www-data user, who's not a member of dialout group (Which I'm pretty sure you need for access to the "hardware" side). Might be worth checking permissions on it, or just run as sudo in first place Steve
ChrisH Posted July 8, 2012 Posted July 8, 2012 Anything to do with the GPIO needs elevated privileges. 1
SimpleSi Posted July 8, 2012 Author Posted July 8, 2012 Yeah - it works OK if I run python using sudo python Si
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now