int NOTE_A4 = 440;
int NOTE_E4 = 330;
int NOTE_A4 = 440;
int NOTE_C4 = 262;
int NOTE_A4 = 440;
int NOTE_B4 = 494;
int NOTE_A4 = 440;
int NOTE_E4 = 330;
int melody[]={
NOTE_A4, NOTE_E4, NOTE_A4, NOTE_C4, NOTE_A4, NOTE_B4, NOTE_A4, NOTE_E4
};
int noteDurations[]={
4, 8, 8, 4, 4, 4, 4, 4
};
void setup() {
for (int thisNote = 0; thisNote < 8; thisNote++){
int noteDuration = 1000/ noteDurations[thisNote];
tone(8,melody[thisNote],noteDuration);
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);
noTone(8);
}
}
void loop() {
}