place persistent variables outside of while loop

This commit is contained in:
janeptrv 2020-11-03 20:48:08 -05:00
parent 3217cf177d
commit 78d39b3eaa

10
leds.py
View file

@ -271,12 +271,12 @@ def querycolor():
def loop():
lcd = Adafruit_CharLCD()
level = 0
level_max = 15
idle = 0
idle_max = 15
cur_color = "ffffff"
while True:
level = 0
level_max = 15
idle = 0
idle_max = 15
cur_color = "ffffff"
debug("loop")
query_color = querycolor()
query_level = querylightlevel()