mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-01-12 20:35:46 +00:00
Docs updates: add installing, advanced recipes, remote gpio and remote recipes - wip
This commit is contained in:
7
docs/examples/traffichat_remote_1.py
Normal file
7
docs/examples/traffichat_remote_1.py
Normal file
@@ -0,0 +1,7 @@
|
||||
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
|
||||
Reference in New Issue
Block a user