From 7c3e0b3db19392d7dce718c9ca9ff416007d5b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 9 Nov 2021 18:22:17 +0100 Subject: [PATCH] Update main.py --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 330543f..ddb6482 100644 --- a/main.py +++ b/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)