Update piplayer4.py
This commit is contained in:
+3
-3
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user