Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide Use hardware momentary switches to control moOde
#67
OK, so now I've actually read Tim's earlier reply:

Code:
GPIO.setup(sw_1_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)

I haven't played with the GPIO package but I interpret this line to mean the pin is enabled as an input pin with its internal pull-up resistor (within the RPi) enabled, which means the pin is already tied to +3.3v through ca 50Kohm. If this is so, then a push button which momentarily connects the pin to +3.3v won't cause a transition.

I expect you have either to change the code to enable the pull-down resistor or to change the switch to connect to ground instead of +3.3v.

Or I could be off in left field again Tongue

Regards,
Kent
Reply


Messages In This Thread
RE: Use hardware momentary switches to control moOde - by TheOldPresbyope - 04-12-2020, 06:29 PM

Forum Jump: