Update piplayer4.py

This commit is contained in:
2018-12-01 00:31:22 +00:00
parent f63e53f5df
commit 1a4d95c2b1
+3 -4
View File
@@ -1,5 +1,5 @@
# piplayer4 - AudioLauncher # piplayer4 - AudioLauncher
# http://www.tilman.de/piplayer4 # http://www.tilman.de/projekte/audiolauncher
import RPi.GPIO as GPIO import RPi.GPIO as GPIO
import logging import logging
@@ -19,9 +19,8 @@ SOUND_SCANNING = "mnt/INTERNAL/sounds/scanning.mp3"
SOUND_SCAN_FAIL = "mnt/INTERNAL/sounds/fail-05.mp3" SOUND_SCAN_FAIL = "mnt/INTERNAL/sounds/fail-05.mp3"
QR_SCANNER_TIMEOUT = 4 QR_SCANNER_TIMEOUT = 4
# photo sensor on PIN 17 # photo sensor on PIN 17
PIN_SENSOR = 4 # TEST PIN_SENSOR = 4 ## TODO TEST
# IR LED on PIN 22 # IR LED on PIN 22
PIN_IR_LED = 22 PIN_IR_LED = 22
@@ -98,7 +97,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) # TEST GPIO.wait_for_edge(PIN_SENSOR, GPIO.FALLING) ## TODO TEST
logging.info('Photo sensor active, activating light and camera') logging.info('Photo sensor active, activating light and camera')
play(SOUND_SCANNING) play(SOUND_SCANNING)