08-10-2016, 03:37 PM
(08-09-2016, 03:52 PM)MarkHaysHarris777 Wrote:Code:import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
p_switch = 19
GPIO.setup(p_switch, GPIO.IN, pull_up_down=GPIO.PUD_UP)
def push_button():
if GPIO.input(p_switch):
return False
else:
return True
That worked for GPIO19, 2 and 3 but not GPIO4. That is what I tested so far.