Update main.py
parent
7c3e0b3db1
commit
7fd658ffa8
4
main.py
4
main.py
|
@ -66,7 +66,7 @@ def blink(strip, color1, color2, iterations=10, wait_ms=10):
|
||||||
strip.show()
|
strip.show()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
def led_power_toggle():
|
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
|
||||||
|
@ -78,7 +78,7 @@ def read_idle():
|
||||||
with open('./idle.txt', 'r') as f:
|
with open('./idle.txt', 'r') as f:
|
||||||
idle_mode = f.readline()
|
idle_mode = f.readline()
|
||||||
|
|
||||||
def change_idle_mode():
|
def change_idle_mode(channel):
|
||||||
global idle_mode
|
global idle_mode
|
||||||
with open('./idle.txt', 'w') as f:
|
with open('./idle.txt', 'w') as f:
|
||||||
f.write(int(idle_mode) + 1)
|
f.write(int(idle_mode) + 1)
|
||||||
|
|
Loading…
Reference in New Issue