Cleanup
This commit is contained in:
parent
4cb09d6ff1
commit
3f4a5ca91e
1 changed files with 1 additions and 3 deletions
|
@ -8,7 +8,6 @@ ledPin = 14
|
||||||
buttonPin = 16
|
buttonPin = 16
|
||||||
|
|
||||||
def buttonHandler(channel):
|
def buttonHandler(channel):
|
||||||
print "button pushed"
|
|
||||||
GPIO.output(ledPin, not GPIO.input(ledPin))
|
GPIO.output(ledPin, not GPIO.input(ledPin))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -23,8 +22,7 @@ try:
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
GPIO.wait_for_edge(15, GPIO.RISING)
|
GPIO.wait_for_edge(15, GPIO.RISING)
|
||||||
print "blah"
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
GPIO.output(ledPin, False)
|
pass
|
||||||
finally:
|
finally:
|
||||||
GPIO.cleanup()
|
GPIO.cleanup()
|
||||||
|
|
Loading…
Reference in a new issue