bf
This commit is contained in:
parent
bb0f00d1a9
commit
98c9ca7a10
@ -302,6 +302,7 @@ def main():
|
||||
|
||||
# blinking LED
|
||||
if GPIO.input(power_controll_pin) == GPIO.LOW:
|
||||
|
||||
if time() - LED_t < .1 and LED_status[0] == False:
|
||||
LED_status[0] = True
|
||||
GPIO.output(LED1_pin, GPIO.HIGH)
|
||||
@ -311,6 +312,10 @@ def main():
|
||||
if time() - LED_t >= LED_t_interval:
|
||||
LED_t = time()
|
||||
else:
|
||||
print('battery low')
|
||||
GPIO.cleanup()
|
||||
quit()
|
||||
|
||||
if time() - emergency_LED_t > emergency_LED_interval:
|
||||
if LED_status[0] != LED_status[1]:
|
||||
GPIO.output(LED1_pin, GPIO.HIGH)
|
||||
|
Loading…
Reference in New Issue
Block a user