From 07473c8a20b62101a31b7411b148fc2a60ab5c2a Mon Sep 17 00:00:00 2001 From: angoosh Date: Sat, 30 Nov 2024 17:11:22 +0100 Subject: [PATCH] added run script which forces Adw light theme because we don't support dark mode at this time --- SW/PC/Stopwatch/run.sh | 2 ++ SW/RPi_Pico_Button/main.py | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 SW/PC/Stopwatch/run.sh diff --git a/SW/PC/Stopwatch/run.sh b/SW/PC/Stopwatch/run.sh new file mode 100755 index 0000000..4d1cde8 --- /dev/null +++ b/SW/PC/Stopwatch/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +GTK_THEME=Adwaita:light python ./main.py diff --git a/SW/RPi_Pico_Button/main.py b/SW/RPi_Pico_Button/main.py index 710150c..148a3e2 100644 --- a/SW/RPi_Pico_Button/main.py +++ b/SW/RPi_Pico_Button/main.py @@ -13,6 +13,7 @@ led_strip = neopixel.NeoPixel(Pin(ws_pin), led_num) push_button = Pin(24, Pin.IN, Pin.PULL_UP) buzzer = Pin(3, Pin.OUT) +led = Pin(25, Pin.OUT) pushbutton_pressed = 0 blink_interrupted = 0 @@ -113,7 +114,7 @@ def count_10_min(): if (ten_min_timer % 60) == 0: if ten_min_timer_led_index == 10: pushbutton_pressed = 0 - blink_and_beep(60) + blink_and_beep(15) if blink_interrupted == 1: blink_interrupted = 0 return @@ -150,6 +151,13 @@ led_strip[6] = green led_strip[8] = green led_strip.write() +led_state = False while True: count_10_min() - time.sleep(0.01) \ No newline at end of file + time.sleep(1) + if led_state: + led.low() + led_state = False + else: + led.high() + led_state = True \ No newline at end of file