mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-01-13 04:46:09 +00:00
Add source/values docs page, close #448
This commit is contained in:
11
docs/examples/combining_sources.py
Normal file
11
docs/examples/combining_sources.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from gpiozero import Button, LED
|
||||
from gpiozero.tools import all_values
|
||||
from signal import pause
|
||||
|
||||
button_a = Button(2)
|
||||
button_b = Button(3)
|
||||
led = LED(17)
|
||||
|
||||
led.source = all_values(button_a.values, button_b.values)
|
||||
|
||||
pause()
|
||||
Reference in New Issue
Block a user