bug fix
This commit is contained in:
parent
4a415271e3
commit
183732b5ad
@ -34,7 +34,7 @@ def main():
|
|||||||
LED1_t_interval = 2
|
LED1_t_interval = 2
|
||||||
|
|
||||||
LED2_t = time()
|
LED2_t = time()
|
||||||
LED2_t_interval = 0.5
|
LED2_t_interval = 1
|
||||||
|
|
||||||
t0 = time()
|
t0 = time()
|
||||||
|
|
||||||
@ -50,7 +50,8 @@ def main():
|
|||||||
if time() - LED1_t >= LED1_t_interval:
|
if time() - LED1_t >= LED1_t_interval:
|
||||||
LED1_t = time()
|
LED1_t = time()
|
||||||
|
|
||||||
# LED blink every 0.5 sec
|
|
||||||
|
# LED blink every 1 sec
|
||||||
if time() - LED2_t < .1 and LED_status[1] == False:
|
if time() - LED2_t < .1 and LED_status[1] == False:
|
||||||
LED_status[1] = True
|
LED_status[1] = True
|
||||||
GPIO.output(LED2_pin, GPIO.HIGH)
|
GPIO.output(LED2_pin, GPIO.HIGH)
|
||||||
@ -59,7 +60,7 @@ def main():
|
|||||||
GPIO.output(LED2_pin, GPIO.LOW)
|
GPIO.output(LED2_pin, GPIO.LOW)
|
||||||
|
|
||||||
if time() - LED2_t >= LED2_t_interval:
|
if time() - LED2_t >= LED2_t_interval:
|
||||||
LED1_t = time()
|
LED2_t = time()
|
||||||
|
|
||||||
GPIO.cleanup()
|
GPIO.cleanup()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user