Modifications

Sauter à la navigation Sauter à la recherche
1 007 octets ajoutés ,  17 septembre 2013 à 09:21
Page créée avec « {{Arduino-Robot-NAV}} <h4>tempWrite()</h4> == Description == Classe RobotControl, librairie d'[[Arduino Robot-Librairie|Ardu... »
{{Arduino-Robot-NAV}}

<h4>tempWrite()</h4>

== Description ==
Classe [[Arduino Robot-Librairie#Classe_RobotControl|RobotControl]], librairie d'[[Arduino Robot-Librairie|Arduino Robot]].

When playing a music file with [[RB-ARD-ROBOT-Func-playFile|playFile()]], this will change the tempo, or speed of the playback. The larger the value, the quicker the sound will play back. Smaller values will slow the playback.

== Syntaxe ==

Robot.tempoWrite(speed)

== Paramètres ==

speed: int, the tempo. Default is 50.

== Résultat ==

aucun

== Exemple ==

<nowiki>#include <ArduinoRobot.h>

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(){

}</nowiki>

== Voir aussi ==
* [[RB-ARD-ROBOT-Func-playFile|playFile()]]
* [[RB-ARD-ROBOT-Func-tuneWrite|tuneWrite()]]

{{Arduino-Robot-TRAILER}}
29 917

modifications

Menu de navigation