GPIO type
This commit is contained in:
		
							parent
							
								
									101ac674ed
								
							
						
					
					
						commit
						aecaf6e9ba
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		
							
								
								
									
										4
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.py
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -31,7 +31,7 @@ toggle_switch_right_pin = 14
 | 
			
		|||
# Cleanup GPIO to avoid "channel already in use" errors
 | 
			
		||||
GPIO.cleanup()
 | 
			
		||||
 | 
			
		||||
GPIO.setmode(GPIO.Board)
 | 
			
		||||
GPIO.setmode(GPIO.BOARD)
 | 
			
		||||
GPIO.setup(button_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
 | 
			
		||||
GPIO.setup(toggle_switch_left_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
 | 
			
		||||
GPIO.setup(toggle_switch_right_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
 | 
			
		||||
| 
						 | 
				
			
			@ -261,4 +261,4 @@ try:
 | 
			
		|||
            kit()
 | 
			
		||||
        time.sleep(0.1)
 | 
			
		||||
except KeyboardInterrupt:
 | 
			
		||||
    GPIO.cleanup()
 | 
			
		||||
    GPIO.cleanup()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue