mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-01-13 04:46:09 +00:00
Convert recipe examples to includes
Makes it much easier to test things - no copying'n'pasting just run the examples straight from the dir (after wiring stuff up)
This commit is contained in:
7
docs/examples/pot_2.py
Normal file
7
docs/examples/pot_2.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from gpiozero import LEDBarGraph, MCP3008
|
||||
from signal import pause
|
||||
|
||||
graph = LEDBarGraph(5, 6, 13, 19, 26, pwm=True)
|
||||
pot = MCP3008(channel=0)
|
||||
graph.source = pot.values
|
||||
pause()
|
||||
Reference in New Issue
Block a user