diff --git a/code/audiorocket.py b/code/audiorocket.py index b4ba325..d320b85 100644 --- a/code/audiorocket.py +++ b/code/audiorocket.py @@ -17,6 +17,7 @@ logging.info('Initializing') MUSIC_BASE_DIRECTORY = "mnt/" SOUND_SCANNING = "mnt/INTERNAL/audiorocket/sounds/scanning.mp3" SOUND_SCAN_FAIL = "mnt/INTERNAL/audiorocket/sounds/fail-05.mp3" +SOUND_SCAN_OK = "mnt/INTERNAL/audiorocket/sounds/ok-05.mp3" QR_SCANNER_TIMEOUT = 4 # photo sensor on PIN 5 @@ -99,6 +100,9 @@ try: poll_result = poll_obj.poll(100) if (poll_result): + play(SOUND_SCAN_OK) + time.sleep(0.5) + qr_code = zbarcam.stdout.readline().rstrip() qr_code = qr_code.decode("utf-8") # python3 logging.info("QR Code: " + qr_code) @@ -134,4 +138,4 @@ except KeyboardInterrupt: finally: logging.info('Reset GPIO configuration and close') - GPIO.cleanup() + GPIO.cleanup() \ No newline at end of file