added run script which forces Adw light theme because we don't support dark mode at this time
This commit is contained in:
parent
c267155b25
commit
07473c8a20
2
SW/PC/Stopwatch/run.sh
Executable file
2
SW/PC/Stopwatch/run.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
GTK_THEME=Adwaita:light python ./main.py
|
@ -13,6 +13,7 @@ led_strip = neopixel.NeoPixel(Pin(ws_pin), led_num)
|
|||||||
|
|
||||||
push_button = Pin(24, Pin.IN, Pin.PULL_UP)
|
push_button = Pin(24, Pin.IN, Pin.PULL_UP)
|
||||||
buzzer = Pin(3, Pin.OUT)
|
buzzer = Pin(3, Pin.OUT)
|
||||||
|
led = Pin(25, Pin.OUT)
|
||||||
|
|
||||||
pushbutton_pressed = 0
|
pushbutton_pressed = 0
|
||||||
blink_interrupted = 0
|
blink_interrupted = 0
|
||||||
@ -113,7 +114,7 @@ def count_10_min():
|
|||||||
if (ten_min_timer % 60) == 0:
|
if (ten_min_timer % 60) == 0:
|
||||||
if ten_min_timer_led_index == 10:
|
if ten_min_timer_led_index == 10:
|
||||||
pushbutton_pressed = 0
|
pushbutton_pressed = 0
|
||||||
blink_and_beep(60)
|
blink_and_beep(15)
|
||||||
if blink_interrupted == 1:
|
if blink_interrupted == 1:
|
||||||
blink_interrupted = 0
|
blink_interrupted = 0
|
||||||
return
|
return
|
||||||
@ -150,6 +151,13 @@ led_strip[6] = green
|
|||||||
led_strip[8] = green
|
led_strip[8] = green
|
||||||
led_strip.write()
|
led_strip.write()
|
||||||
|
|
||||||
|
led_state = False
|
||||||
while True:
|
while True:
|
||||||
count_10_min()
|
count_10_min()
|
||||||
time.sleep(0.01)
|
time.sleep(1)
|
||||||
|
if led_state:
|
||||||
|
led.low()
|
||||||
|
led_state = False
|
||||||
|
else:
|
||||||
|
led.high()
|
||||||
|
led_state = True
|
Loading…
x
Reference in New Issue
Block a user