• Fort the stop play:

    Make this line

    var watch;
    

    the very first line in your code and insert after the line in which you turn the LED1 on these lines:

    watch = setWatch(function(){ // set the watch for stopping
        w.stop(); 
        setWatch(play, BTN1, { repeat: false, edge:'xxxxx' , debounce:50});
      }, BTN1, { repeat: false, edge:'xxxxx' , debounce:50});
    

    Then add in the stop before the line with w.stop(); this line:

    clearWatch(watch); // clears the watch for stopping
    
About

Avatar for allObjects @allObjects started