How can I disable a GPIO pin or set it to off whenever I execute a method in Python?
7
-
3What do you mean by disable, are you writing or reading from the pin? – Steve Robillard May 5 '15 at 7:19
-
3Use a wire cutter – Werner Kvalem Vesterås May 5 '15 at 7:40
-
1Why not just ignore the reset gpio if the stopwatch is running? – joan May 5 '15 at 9:47
-
1Kind of. You want to set some kind of state variable such that when you don't want the reset button to work, it won't work. meta.stackexchange.com/questions/66377/what-is-the-xy-problem/… When a program is busy doing something and some GUI controls are invalid for that time, it does not disable the mouse, but if you click the mouse pointer on those controls, nothing will happen. That's what state is about. There's more than one state, and if something cannot happen in all of them, you need to check what the state currently is first before you allow it. – goldilocks♦ May 5 '15 at 19:11
-
1@WernerKvalemVesterås that won't disable the pin, just make it shorter. You should know that. – PhillyNJ May 5 '15 at 19:14
|
Show 2 more comments
I'm going to go out on a limb and guess that whatever you want will be handled by one of the software libraries mentioned at http://elinux.org/RPi_Low-level_peripherals#GPIO_Code_examples