This commit is contained in:
tillraab 2019-09-18 16:11:58 +02:00
parent bb0f00d1a9
commit 98c9ca7a10

View File

@ -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)