mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-04-25 08:23:53 +00:00
Add source/values docs page, close #448
This commit is contained in:
11
docs/examples/matching_leds.py
Normal file
11
docs/examples/matching_leds.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from gpiozero import LED, Button
|
||||
from signal import pause
|
||||
|
||||
red = LED(14)
|
||||
green = LED(15)
|
||||
button = Button(17)
|
||||
|
||||
red.source = button.values
|
||||
green.source = red.values
|
||||
|
||||
pause()
|
||||
Reference in New Issue
Block a user