Hello all!
This is for use in an exhibition space, and I am searching around for a method to disable the button (17) as long as the script is running, to avoid several paralell playback`s when the audience are passing the motion sensor. Here is my script so far:
import simpleaudio as sa
from gpiozero import Button
btn_play_obj = Button(17)
wave_obj = sa.WaveObject.from_wave_file('samples/test3.wav')
play_obj = wave_obj.play
btn_play_obj.when_pressed = wave_obj.play
---
I suppose I will need som "if" or "when" and "sleep" commands ...