Jump to content

Recommended Posts

Posted

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

Posted
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 :p
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...