Question(s) regarding Raspberry Pi and GPIO.
Been working with RPi.GPIO for several weeks trying to get the following script to run: (from Third Eye Visions, using the GPIO Python library that they suggest to use)
import RPi.GPIO as GPIO
GPIO.setmode (GPIO,BOARD)
GPIO.setup (7, GPIO.OUT)
GPIO.output (7, True)
When running from the Lynux command line, an error is posted “no access to /dev/mem. Try running as root”
I go to command line and run sudo/home/pi/file name and another error is returned “command not found”.
Doing a brief search on line, I don’t seem to be the only person having this problem. I simply don’t understand the solutions that are presented and it is not clear that the solutions solve the problem.
When using RPi.GPIO 0.5.4 revision of the Python Package Index, isn’t this problem resolved?
I am using the Debian Wheezy Rasbiabn 2012.12.img 192, Debian GNU/Linux 7 raspberry pi tty1
I have Python 2.7, 3.2 and 3 on the SD and Python IDE.
I want to program the raspberry pi using GPIO functions with Python not C or any other script.
Why won’t the current upgrade of Raspberry Pi from Third Eye Visions work with the above script? This is not the only GPIO program (from other sources) that I have tried and receive the same result. I can control the pins in the command line of Linux from the keyboard using set mode, etc and read the status of the pins using readall.
I have used Pygame with this distribution of Debian and it works perfectly.
Can anyone supply a simple fix for this problem? Can it be solved with a new SD loaded with a raspberry pi compatible program set-up with Python? If so. where can I find one.? Or can I simply add one or two lines to the script that will allow access into
/dev/mem and then reinstate root privileges to /dev/mem at the point of exit from the program?
Help!
morgsterdad





