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) GPIO.setup(CHANNEL, GPIO.IN)
if GPIO.input(CHANNEL): while (True):
print('Input was HIGH') if GPIO.input(CHANNEL):
else: print('Input was HIGH')
print('Input was LOW') else:
print('Input was LOW')
sleep(1)
GPIO.cleanup() GPIO.cleanup()