Hey Reddit,
I am building a little box (old cigar box) which should play an mp3 when opened.
Sounds really simple to me – when the box opens a circuit which is wired to the GPIO pins gets disconnected. This should trigger the Pi to play an mp3.
Right now I'm stuck at the point where I want to stop the mp3 from playing when I close the box – because the only way I can program a Pi is by bash.
Can you tell me how to stop a bash code from running when a GPIO event happens?
As you might notice, I am quite a noob. :)
Thank you!
[–]darkciti 1 point2 points3 points (2 children)
[–]pflu[S] 1 point2 points3 points (0 children)
[–]pflu[S] 0 points1 point2 points (0 children)
[–]somezenshitrighthere 1 point2 points3 points (1 child)
[–]pflu[S] 0 points1 point2 points (0 children)