mirror of
				https://github.com/KevinMidboe/python-gpiozero.git
				synced 2025-10-29 17:50:37 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			234 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			234 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from gpiozero import LED
 | 
						|
from gpiozero.pins.pigpio import PiGPIOFactory
 | 
						|
from signal import pause
 | 
						|
 | 
						|
factory = PiGPIOFactory(host='192.168.1.3')
 | 
						|
 | 
						|
button = Button(2)
 | 
						|
led = LED(17, pin_factory=factory)
 | 
						|
 | 
						|
led.source = button.values
 | 
						|
 | 
						|
pause()
 |