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