mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Add Pi Zero OTG, sense hat examples and more docs
This commit is contained in:
10
docs/examples/sense_hat_remote.py
Normal file
10
docs/examples/sense_hat_remote.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from gpiozero import MotionSensor
|
||||
from gpiozero.pins.pigpio import PiGPIOPin
|
||||
from sense_hat import SenseHat
|
||||
|
||||
pir = MotionSensor(PiGPIOPin(4, host='192.168.1.4')) # remote motion sensor
|
||||
sense = SenseHat() # local sense hat
|
||||
|
||||
while True:
|
||||
pir.wait_for_motion()
|
||||
sense.show_message(sense.temperature)
|
||||
Reference in New Issue
Block a user