Arduino Function: RobotControl.tuneWrite

Description

This function will change the pitch of the sound that is currently playing through playFile(). The larger the value, the higher the pitch. 1.0 is the baseline value.

Syntax

Robot.tuneWrite(pitch)

Parameters

pitch: float, indicating the pitch of the sound currently playing.

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.tuneWrite(1.4);//40% higher than default
}

void loop(){

}


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