mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-01-12 04:15:47 +00:00
8 lines
253 B
Python
8 lines
253 B
Python
import gpiozero
|
|
from gpiozero import TrafficHat
|
|
from gpiozero.pins.pigpio import PiGPIOFactory
|
|
from time import sleep
|
|
|
|
gpiozero.Device._set_pin_factory(PiGPIOFactory(host='192.168.1.3'))
|
|
th = TrafficHat() # traffic hat on 192.168.1.3 using remote pins
|