Update piplayer4.py
This commit is contained in:
+3
-3
@@ -92,7 +92,7 @@ try:
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
logging.info('Wait for photo sensor')
|
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')
|
logging.info('Photo sensor active, activating light and camera')
|
||||||
play(SOUND_SCANNING)
|
play(SOUND_SCANNING)
|
||||||
@@ -137,8 +137,8 @@ try:
|
|||||||
GPIO.output(PIN_LED, GPIO.LOW)
|
GPIO.output(PIN_LED, GPIO.LOW)
|
||||||
|
|
||||||
# wait until sensor is not blocked anymore
|
# wait until sensor is not blocked anymore
|
||||||
if (GPIO.input(PIN_SENSOR) == GPIO.HIGH):
|
if (GPIO.input(PIN_SENSOR) == GPIO.LOW):
|
||||||
GPIO.wait_for_edge(PIN_SENSOR, GPIO.FALLING)
|
GPIO.wait_for_edge(PIN_SENSOR, GPIO.RISING)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user