fix spaces
This commit is contained in:
@@ -56,13 +56,13 @@ def loop_neopixel():
|
||||
led_strip.fill(color)
|
||||
led_strip.write()
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
neopix_loop_dot_pos = 0
|
||||
def neopixel_loop_dot():
|
||||
global neopix_loop_dot_pos
|
||||
color = (255, 0, 0)
|
||||
black = (0, 0, 0)
|
||||
|
||||
|
||||
color = set_neopixel_brightness(color)
|
||||
led_strip[neopix_loop_dot_pos] = black
|
||||
neopix_loop_dot_pos += 1
|
||||
@@ -71,16 +71,16 @@ def neopixel_loop_dot():
|
||||
led_strip[neopix_loop_dot_pos] = color
|
||||
led_strip.write()
|
||||
time.sleep(0.2)
|
||||
|
||||
|
||||
def lightup_led(index, color):
|
||||
led_strip[index] = color
|
||||
led_strip.write()
|
||||
|
||||
|
||||
def blink_and_beep(times):
|
||||
global pushbutton_pressed, blink_interrupted
|
||||
|
||||
|
||||
blink_delay = 0.2
|
||||
|
||||
|
||||
#insert beep
|
||||
buzzer.value(1)
|
||||
for i in range(0, times):
|
||||
@@ -97,20 +97,20 @@ def blink_and_beep(times):
|
||||
buzzer.value(0)
|
||||
return
|
||||
buzzer.value(0)
|
||||
|
||||
|
||||
ten_min_timer = 0
|
||||
ten_min_timer_led_index = 11
|
||||
def count_10_min():
|
||||
global ten_min_timer, ten_min_timer_led_index, pushbutton_pressed, blink_interrupted
|
||||
|
||||
|
||||
red = (255, 0, 0)
|
||||
red = set_neopixel_brightness(red)
|
||||
green = (0, 255, 0)
|
||||
green = set_neopixel_brightness(green)
|
||||
|
||||
|
||||
if ten_min_timer_led_index == 11:
|
||||
return
|
||||
|
||||
|
||||
if (ten_min_timer % 60) == 0:
|
||||
if ten_min_timer_led_index == 10:
|
||||
pushbutton_pressed = 0
|
||||
@@ -128,7 +128,7 @@ def count_10_min():
|
||||
return
|
||||
lightup_led(ten_min_timer_led_index, red)
|
||||
ten_min_timer_led_index += 1
|
||||
|
||||
|
||||
ten_min_timer += 1
|
||||
|
||||
def button_callback(push_button):
|
||||
|
||||
Reference in New Issue
Block a user