Arduino Function: RobotControl.beep

Description

Make a short beeping sound. This method must be preceded by Robot.beginSpeaker() in setup().

Syntax

Robot.beep(beep_length)

Parameters

The parameter beep_length can be any of the const below indicating type of beep sound. *BEEP_SIMPLE: a short beep *BEEP_DOUBLE: double beep *BEEP_LONG: a longer beep

Note

When a beep is playing all other processes stop running.

Examples

#include 

void setup(){
  Robot.begin();
  Robot.beginSpeaker();//Initialize the sound module
}

void loop(){
  Robot.beep(BEEP_SIMPLE);//Make a single beep sound
  delay(1000);
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc