Update main.py
parent
36a1f39928
commit
7c3e0b3db1
5
main.py
5
main.py
|
@ -72,14 +72,19 @@ def led_power_toggle():
|
|||
led_power = False
|
||||
else:
|
||||
led_power = True
|
||||
print('Led toggled: '+led_power)
|
||||
|
||||
def read_idle():
|
||||
with open('./idle.txt', 'r') as f:
|
||||
idle_mode = f.readline()
|
||||
|
||||
def change_idle_mode():
|
||||
global idle_mode
|
||||
with open('./idle.txt', 'w') as f:
|
||||
f.write(int(idle_mode) + 1)
|
||||
with open('./idle.txt', 'r') as f:
|
||||
idle_mode = f.readline()
|
||||
print('Change Idle-Mode: '+idle_mode)
|
||||
|
||||
if __name__ == '__main__':
|
||||
strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL)
|
||||
|
|
Loading…
Reference in New Issue