Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from gpiozero import LEDBarGraph
from time import sleep
graph = LEDBarGraph(20, 21, 12, pwm=True)
graph.value = 1
sleeptime = .01
while True:
for i in range(0, 100, 1):
graph.value = i/100
sleep(sleeptime)
for i in range(100, 0, -1):
graph.value = i/100
sleep(sleeptime)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.