buzzer.stop()

Category:Circuit Playground

Stops the buzzer from playing.

buzzer.stop() stops the buzzer from playing any sounds, much like how colorLeds[i].stop() stops the colorLED(s) from blinking.

Examples

onBoardEvent(buttonL, "press", function(event) {
  buzzer.note("C4");
  
});

onBoardEvent(buttonR, "press", function(event) {
  buzzer.stop();
  
});

Syntax

buzzer.stop()

Found a bug in the documentation? Let us know at documentation@code.org