Created
January 7, 2016 10:52
-
-
Save G10DRAS/e6083b064d0c7e073205 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
import time | |
button = 20 | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(button, GPIO.IN, pull_up_down=GPIO.PUD_UP) | |
input_state = GPIO.input(button) | |
print input_state | |
GPIO.cleanup() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment