Files
python-gpiozero/docs/examples/traffichat_remote_1.py
2017-07-14 14:01:29 +01:00

8 lines
249 B
Python

import gpiozero
from gpiozero import TrafficHat
from gpiozero.pins.pigpio import PiGPIOFactory
from time import sleep
gpiozero.Device.pin_factory = PiGPIOFactory(host='192.168.1.3')
th = TrafficHat() # traffic hat on 192.168.1.3 using remote pins