const int pinBuzzer=8;

const int Do=261;

const int Re=294;

const int Mi=329;

const int Fa= 349;

const int Sol=392;

const int La=440;

const int p=0;

const int SolB=196;

 

int melodia[]={

Do, Re, Mi, Do,

Do, Re, Mi, Do,

Mi, Fa, Sol,p,

Mi, Fa, Sol,p,

Sol, La, Sol, Fa, Mi, Do,

Sol, La, Sol, Fa, Mi, Do,p,

Re, SolB, Do,p,

Re, SolB, Do,p

};

 

 

void setup() {

pinMode(pinBuzzer, OUTPUT);

}

 

void loop() {

for(int i=0; i< 37; i++){

tone(pinBuzzer, melodia[i], 100);

delay(250);

}

while(1);

}