Basically, I need to disable or turn off a GPIO pin whenever I execute a method in python.
Does anyone knows how to disable the pins?
There is a built-in function GPIO.cleanup() that clean up all the ports you've used.
For the power and ground pins, they are not under software control.
How to disable GPIO pins on the RaspberryPi?