Arduino Function: Esplora.tone


This function generates a square wave of the specified frequency from the Esplora's onboard buzzer. A duration can be specified in milliseconds, otherwise the wave continues until a call to Esplora.noTone(). Only one tone can be generated at a time. If a tone is already playing, the call will set its frequency. Use of the tone() function will interfere with fading the red LED.


Esplora.tone(frequency, duration)


  • frequency: the frequency of the tone in hertz - unsigned int
  • duration: the duration of the tone in milliseconds (optional) - unsigned long

Based on the reference originally written by Arduino Community, and