Before putting all into callbacks
This commit is contained in:
+2
-2
@@ -13,7 +13,7 @@ try:
|
||||
print('Start sensor test')
|
||||
|
||||
while True:
|
||||
time.sleep(0.25)
|
||||
time.sleep(0.75)
|
||||
if (GPIO.input(17) == GPIO.LOW):
|
||||
print('LOW')
|
||||
GPIO.output(27, GPIO.LOW)
|
||||
@@ -22,6 +22,6 @@ try:
|
||||
GPIO.output(27, GPIO.HIGH)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print('bye')
|
||||
print('KeyboardInterrupt')
|
||||
GPIO.cleanup()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user