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
10
leds.py
10
leds.py
|
@ -271,12 +271,12 @@ def querycolor():
|
||||||
|
|
||||||
def loop():
|
def loop():
|
||||||
lcd = Adafruit_CharLCD()
|
lcd = Adafruit_CharLCD()
|
||||||
|
level = 0
|
||||||
|
level_max = 15
|
||||||
|
idle = 0
|
||||||
|
idle_max = 15
|
||||||
|
cur_color = "ffffff"
|
||||||
while True:
|
while True:
|
||||||
level = 0
|
|
||||||
level_max = 15
|
|
||||||
idle = 0
|
|
||||||
idle_max = 15
|
|
||||||
cur_color = "ffffff"
|
|
||||||
debug("loop")
|
debug("loop")
|
||||||
query_color = querycolor()
|
query_color = querycolor()
|
||||||
query_level = querylightlevel()
|
query_level = querylightlevel()
|
||||||
|
|
Loading…
Reference in a new issue