mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Add more advanced and remote recipes
This commit is contained in:
11
docs/examples/timed_heat_lamp.py
Normal file
11
docs/examples/timed_heat_lamp.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from gpiozero import Energenie, TimeOfDay
|
||||
from datetime import time
|
||||
from signal import pause
|
||||
|
||||
lamp = Energenie(1)
|
||||
daytime = TimeOfDay(time(8), time(20))
|
||||
|
||||
lamp.source = daytime.values
|
||||
lamp.source_delay = 60
|
||||
|
||||
pause()
|
||||
Reference in New Issue
Block a user