mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
15 lines
261 B
Python
15 lines
261 B
Python
from gpiozero import LED, PingServer
|
|
from gpiozero.tools import negated
|
|
from signal import pause
|
|
|
|
green = LED(17)
|
|
red = LED(18)
|
|
|
|
google = PingServer('google.com')
|
|
|
|
green.source = google.values
|
|
green.source_delay = 60
|
|
red.source = negated(green.values)
|
|
|
|
pause()
|