//Trying to understand the Buzzer and its coding.
#define Buzzer 13
//Making a song(Tunes)
int C = 262; //Music notes I think.
int D = 294;
int E = 330;
int F = 349;
int G = 392;
int A = 440;
int B = 494;
int C_H = 523;
//Defining an array
int notes[] = {C,D,E,F,G,A,B,C_H};
int number_of_notes = 8;
void setup() {
pinMode(Buzzer, OUTPUT); //Setting this appropriate for output devices
//Only running this code once. so using the void setup()
}
void loop() {
// To repeat the song
for (int i=0; i < number_of_notes; i++){
tone(Buzzer, notes[i]);
delay(500);
noTone(Buzzer);
delay(2);
}
delay(5000);
}