Update main.py
parent
fcd91632aa
commit
2a15a35814
6
main.py
6
main.py
|
@ -70,10 +70,10 @@ def led_power_toggle(channel):
|
||||||
global led_power
|
global led_power
|
||||||
if led_power == True:
|
if led_power == True:
|
||||||
led_power = False
|
led_power = False
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
led_power = True
|
led_power = True
|
||||||
print('Led toggled: '+str(led_power))
|
return True
|
||||||
return led_power
|
|
||||||
|
|
||||||
def read_idle():
|
def read_idle():
|
||||||
with open('./idle.txt', 'r') as f:
|
with open('./idle.txt', 'r') as f:
|
||||||
|
@ -114,7 +114,7 @@ if __name__ == '__main__':
|
||||||
with open('./idle.txt', 'r') as f:
|
with open('./idle.txt', 'r') as f:
|
||||||
idle_mode = f.readline()
|
idle_mode = f.readline()
|
||||||
|
|
||||||
print(str(led_power_toggle))
|
print(led_power_toggle)
|
||||||
|
|
||||||
if led_power_toggle == False:
|
if led_power_toggle == False:
|
||||||
setColor(strip, Color(0,0,0))
|
setColor(strip, Color(0,0,0))
|
||||||
|
|
Loading…
Reference in New Issue