Arduino Function: RobotControl.beginSpeaker

Description

This function initializes the speaker and sound libraries. Must be called in the setup() block.

Syntax

Robot.beginSpeaker()

Examples

#include 

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

void loop(){
  char aTinyMelody[] = "8eF-FFga4b.a.g.F.8beee-d2e.1-";// This is what we will play
  Robot.playMelody(aTinyMelody);// Play the melody
}


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