Melodía de piratas en el buzzer del R8 (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);

 

}
Categoría:

Información adicional

Plataforma

Arduino

Valoraciones

No hay valoraciones aún.

Sé el primero en valorar “Melodía de piratas en el buzzer del R8 (Arduino)”

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *