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

View file

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