Closed GoogleCodeExporter closed 9 years ago
Change now in source code library. Awaiting formal release in 0.4.0a
Original comment by btcros...@googlemail.com
on 9 Sep 2012 at 3:04
Just tested it successfully.
But the check you added in py_setup_channel is may be too much as you must use
force=1 if you close RPi.GPIO then reopen it. It can happen if you use RPi.GPIO
with cron for instance.
pi@raspberrypi ~ $ sudo python
Python 2.7.3rc2 (default, May 6 2012, 20:02:25)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi.GPIO as g
>>> g.setmode(g.BCM)
>>> g.gpio_function(7)
1
>>> g.setup(7, 0)
>>> g.gpio_function(7)
0
>>>
KeyboardInterrupt
>>>
pi@raspberrypi ~ $ sudo python
Python 2.7.3rc2 (default, May 6 2012, 20:02:25)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi.GPIO as g
>>> g.setmode(g.BCM)
>>> g.gpio_function(7)
0
>>> g.setup(7, 1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RPi.GPIO.InvalidChannelException: This channel is in use. Try GPIO.setup( ...
, force=1) to override
>>>
Original comment by tro...@trouch.com
on 9 Sep 2012 at 4:30
Exception changed to just a warning message.
Included in release 0.4.0a - closing issue
Original comment by btcros...@googlemail.com
on 21 Sep 2012 at 1:51
Original issue reported on code.google.com by
btcros...@googlemail.com
on 9 Sep 2012 at 3:02