I'm VERY new to Python and am currently programming a Photobooth. I want to deactivate the Buttonpress until a coin is tossed and want it to deactivate when the photo is Saved. I just don't get how i could code it that the action ButtonPress works until something happens.
I know my code is very chaotic but it works fine overall. I program it on a Raspberry pi and have the Coin Acceptor on GPIO 18. I get 10 Pulses because it is a coin acceptor which only works with 1€ coins.
this is the code I'm using.
Would be awesome if somebody could lighten my darkness! Thanks in advance!