diff --git a/push_to_record_and_play.py b/push_to_record_and_play.py index e6cd4ab..623531f 100644 --- a/push_to_record_and_play.py +++ b/push_to_record_and_play.py @@ -12,10 +12,11 @@ GPIO.setup(BUTTON, GPIO.IN) audioInstance = audio.Audio() while True: - state = GPIO.input(BUTTON) if audioInstance.isRecording(): audioInstance.readChunk() + state = GPIO.input(BUTTON) + if state: print("button: OFF") if audioInstance.isRecording():