How to stop the music when button presed


#1

Hi,

I have written a program to play a defined tone continously when on board button is pressed. How do program it to stop the music when i press the button second time. Please help


#2

After the “Wait until button pressed” statement, add a “Wait until button released” statement.
The change the Forever loop to a “Repeat until button pressed” loop.


#3

thank you!!