place persistent variables outside of while loop
This commit is contained in:
parent
3217cf177d
commit
78d39b3eaa
1 changed files with 5 additions and 5 deletions
2
leds.py
2
leds.py
|
@ -271,12 +271,12 @@ def querycolor():
|
|||
|
||||
def loop():
|
||||
lcd = Adafruit_CharLCD()
|
||||
while True:
|
||||
level = 0
|
||||
level_max = 15
|
||||
idle = 0
|
||||
idle_max = 15
|
||||
cur_color = "ffffff"
|
||||
while True:
|
||||
debug("loop")
|
||||
query_color = querycolor()
|
||||
query_level = querylightlevel()
|
||||
|
|
Loading…
Reference in a new issue