Información adicional
Plataforma | Arduino |
---|
/* Programa que reproduce la melodia de «Piratas del Caribe */
int sound = 10;// definir el pin del parlante
void setup(){
pinMode (sound, OUTPUT); //pin configurado como salida
}
// funcion = tone(pin, frequency, duration)
void loop() {
//digitalWrite(10,HIGH);
tone(sound,293.66,200);
delay(100);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,200);
delay(200);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,200);
delay(200);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,200);
delay(200);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,200);
delay(200);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,200);
delay(200);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,200);
delay(200);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,200);
delay(200);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,200);
delay(200);
tone(sound,293.66,100);
delay(100);
tone(sound,293.66,100);
delay(100);
tone(sound,440,100);
delay(100);
tone(sound,523.25,100);
delay(100);
tone(sound,587.33,100);
delay(200);
tone(sound,587.33,100);
delay(200);
tone(sound,587.33,100);
delay(100);
tone(sound,659.25,100);
delay(100);
tone(sound,698.45,100);
delay(200);
tone(sound,698.45,100);
delay(200);
tone(sound,698.45,100);
delay(100);
tone(sound,783.99,100);
delay(100);
tone(sound,659.25,100);
delay(200);
tone(sound,659.25,100);
delay(200);
tone(sound,587.33,100);
delay(100);
tone(sound,523.25,100);
delay(100);
tone(sound,523.25,100);
delay(100);
tone(sound,587.33,100);
delay(300);
tone(sound,440,100);
delay(100);
tone(sound,523.25,100);
delay(100);
tone(sound,587.33,100);
delay(200);
tone(sound,587.33,100);
delay(200);
tone(sound,587.33,100);
delay(100);
tone(sound,659.25,100);
delay(100);
tone(sound,698.45,100);
delay(200);
tone(sound,698.45,100);
delay(200);
tone(sound,698.45,100);
delay(100);
tone(sound,783.99,100);
delay(100);
tone(sound,659.25,100);
delay(200);
tone(sound,659.25,100);
delay(200);
tone(sound,587.33,100);
delay(100);
tone(sound,523.25,100);
delay(100);
tone(sound,587.33,100);
delay(400);
tone(sound,440,100);
delay(100);
}
Valoraciones
No hay valoraciones aún.