looooooping

This commit is contained in:
Giulio De Pasquale 2017-08-18 14:34:25 +02:00
parent c01556ac9f
commit 1d7ba2e56d

View File

@ -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()