Update main.py

master
Ebbe Baß 2021-11-09 18:22:17 +01:00
parent 36a1f39928
commit 7c3e0b3db1
1 changed files with 5 additions and 0 deletions

View File

@ -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)