Si - do you want it to clean up the pin when you GPIO.setup(channel, GPIO.NONE) i.e. return the channel to INPUT and remove pullup/down and any events?
Alternative - RPi.GPIO leaves the pin as configured and just 'forgets' about it (like when you don't run cleanup() ).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
GPIO.cleanup(channel) fix now in source code library. Will be part of next release. I will make the next release as soon as you have tested this fix.
To install the dev version with this fix:
$ sudo apt-get remove python-rpi.gpio python3-rpi.gpio
$ sudo apt-get install python-pip python3-pip python-dev python3-dev
$ mkdir ~/temp
$ cd ~/temp
$ sudo pip-2.7 install -e hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO
$ sudo pip-3.2 install -e hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO
To remove the dev version and switch back to the Raspbian default version:
$ sudo pip-2.7 uninstall RPi.GPIO
$ sudo pip-3.2 uninstall RPi.GPIO
$ sudo apt-get install python-rpi.gpio python3-rpi.gpio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Si - do you want it to clean up the pin when you GPIO.setup(channel, GPIO.NONE) i.e. return the channel to INPUT and remove pullup/down and any events?
Alternative - RPi.GPIO leaves the pin as configured and just 'forgets' about it (like when you don't run cleanup() ).
Yes - return it to state it would have been in had it never been used for anything please :)
So GPIO.cleanup(channel) call then?
GPIO.cleanup(channel) fix now in source code library. Will be part of next release. I will make the next release as soon as you have tested this fix.
To install the dev version with this fix:
$ sudo apt-get remove python-rpi.gpio python3-rpi.gpio
$ sudo apt-get install python-pip python3-pip python-dev python3-dev
$ mkdir ~/temp
$ cd ~/temp
$ sudo pip-2.7 install -e hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO
$ sudo pip-3.2 install -e hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO
To remove the dev version and switch back to the Raspbian default version:
$ sudo pip-2.7 uninstall RPi.GPIO
$ sudo pip-3.2 uninstall RPi.GPIO
$ sudo apt-get install python-rpi.gpio python3-rpi.gpio
In release 0.5.5 - issue closed