Hi
Wondering if anyone can help me work out why I can’t get the python demos to run (the Selftest appears to run ok).
after doing:
sudo apt-get update
sudo apt-get install python-dev
sudo apt-get install python-rpi.gpio
I try to run the ospi_gc.py code, and get this error:
pi@raspberrypi /home/webide/repositories/opensprinkler/OpenSprinkler Pi/software/demos/gcalendar $ sudo python ospi_gc.py
OpenSprinkler Pi has started...
Traceback (most recent call last):
File "ospi_gc.py", line 148, in
main()
File "ospi_gc.py", line 121, in main
GPIO.cleanup()
AttributeError: 'module' object has no attribute 'cleanup'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "ospi_gc.py", line 143, in progexit
shiftOut(station_bits)
File "ospi_gc.py", line 78, in shiftOut
GPIO.output(pin_sr_clk, False)
ModeNotSetException: Please set mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "ospi_gc.py", line 143, in progexit
shiftOut(station_bits)
File "ospi_gc.py", line 78, in shiftOut
GPIO.output(pin_sr_clk, False)
RPi.GPIO.ModeNotSetException: Please set mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)
Have tried changing the GPIO pin defines, but i think the errors point to the GPIO library not being installed properly perhaps?
My next step might be to try some generic GPIO code from https://pypi.python.org/pypi/RPi.GPIO ..
dargs