Committing source

This commit is contained in:
Clayton Walker
2016-04-13 21:40:40 -04:00
parent 7ab0bccd11
commit 000b695324
21 changed files with 7710 additions and 0 deletions

14
button.py Executable file
View File

@ -0,0 +1,14 @@
import RPi.GPIO as GPIO ## Import GPIO Library
inPin = 8 ## Switch connected to pin 8
GPIO.setmode(GPIO.BOARD) ## Use BOARD pin numbering
GPIO.setup(inPin, GPIO.IN) ## Set pin 8 to INPUT
while True: ## Do this forever
value = GPIO.input(inPin) ## Read input from switch
if value: ## If switch is released
print "Not Pressed"
else: ## Else switch is pressed
print "Pressed"
GPIO.cleanup()