Skip to content

Instantly share code, notes, and snippets.

@brianz brianz/
Created Feb 5, 2016

What would you like to do?
import RPi.GPIO as GPIO
import time
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
input_state = GPIO.input(18)
if input_state == False:
print('Button Pressed')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.