#define Buzzer 12
int C = 256;
int D = 288;
int E = 320;
int F = 341;
int G = 384;
int A = 426;
int B = 480;
int C_H = 512;
int notes[] = {C,D,E,F,G,A,B,C_H};
int n_notes = 8;
void setup() {
// put your setup code here, to run once:
pinMode(Buzzer, OUTPUT);
for (int i = 0 ; i < n_notes ; i++){
tone(Buzzer, notes[i]);
delay(500);
noTone(Buzzer);
delay(2);
}
for (int i = n_notes ; i >= 0 ; i--){
tone(Buzzer, notes[i]);
delay(500);
noTone(Buzzer);
delay(2);
}
}
void loop() {
// put your main code here, to run repeatedly:
// this speeds up the simulation
}