From fea202b0d440b3d74e71bb9c7bd59a790b153118 Mon Sep 17 00:00:00 2001 From: Tilman Date: Wed, 12 Dec 2018 21:39:08 +0000 Subject: [PATCH] Update piplayer4.py --- code/piplayer4.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/piplayer4.py b/code/piplayer4.py index 2e48f2d..cf39d00 100644 --- a/code/piplayer4.py +++ b/code/piplayer4.py @@ -92,7 +92,7 @@ try: while True: logging.info('Wait for photo sensor') - GPIO.wait_for_edge(PIN_SENSOR, GPIO.FALLING) ## TODO TEST + GPIO.wait_for_edge(PIN_SENSOR, GPIO.FALLING) logging.info('Photo sensor active, activating light and camera') play(SOUND_SCANNING) @@ -137,8 +137,8 @@ try: GPIO.output(PIN_LED, GPIO.LOW) # wait until sensor is not blocked anymore - if (GPIO.input(PIN_SENSOR) == GPIO.HIGH): - GPIO.wait_for_edge(PIN_SENSOR, GPIO.FALLING) + if (GPIO.input(PIN_SENSOR) == GPIO.LOW): + GPIO.wait_for_edge(PIN_SENSOR, GPIO.RISING) time.sleep(1)