Arduino Function: RobotControl.tempoWrite

Description

This function changes the tempo (or speed) of the file thah is currently playing through playFile(). The larger the value, the quicker the sound will play back. Smaller values will slow the playback.

Syntax

Robot.tempoWrite(speed)

Parameters

speed: int, the tempo. Default is 50.

Examples

#include 

void setup(){
 Robot.begin();
 Robot.beginSpeaker();//Initialize the sound module
 Robot.beginSD();//Initialize the sd card
 Robot.playFile("melody.sqm");//Play the original music come with the robot.
 Robot.tempoWrite(70);//20 higher than default
}

void loop(){

}


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