looooooping
This commit is contained in:
parent
c01556ac9f
commit
1d7ba2e56d
10
calzelarm.py
10
calzelarm.py
@ -5,9 +5,11 @@ GPIO.setmode(GPIO.BOARD)
|
||||
|
||||
GPIO.setup(CHANNEL, GPIO.IN)
|
||||
|
||||
if GPIO.input(CHANNEL):
|
||||
print('Input was HIGH')
|
||||
else:
|
||||
print('Input was LOW')
|
||||
while (True):
|
||||
if GPIO.input(CHANNEL):
|
||||
print('Input was HIGH')
|
||||
else:
|
||||
print('Input was LOW')
|
||||
sleep(1)
|
||||
|
||||
GPIO.cleanup()
|
||||
|
Loading…
Reference in New Issue
Block a user