int N1 = 262;
int N2 = 294;
int N3 = 330;
int N4 = 349;
int N5 = 392;
int N6 = 440;
int N7 = 494;
int melody[] = {
N1, N1, N1, N3, N6, N3, N5, N5, N6, N5, N3, N4, N3, N2, N2, N2, N2, N5, N7, N7, N6, N5, N4, N4, N3, N1, N3, N2, N1, N1, N1, N6, N3, N5, N5, N6, N5, N3, N4, N3, N2
};
int noteDurations[]={
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,4,2,4,4,4,4,4,4,4
};
void setup() {
// put your setup code here, to run once:
for(int thisNote = 0; thisNote < 100; thisNote++){
int noteDuration = 1000 / noteDurations[thisNote];
tone(10, melody[thisNote], noteDuration);
int pauseBetweenNotes = noteDuration * 1.00;
delay(pauseBetweenNotes);
noTone(10);
}
}
void loop() {
// put your main code here, to run repeatedly:
}