#define Buzzer 10
int delaytime = 3000;
int tryloop= 5;
// Notaların frekansları (Hz)
// const int noteFrequencies[] = {50, 100, 300, 50, 500, 10, 1500, 100}; // notalar
// const int noteDurations[] = {4, 8, 8, 4, 4, 4, 4, 4}; // Notaların süresi (milisaniye)
// void playTone(int frequency, int duration) {
// tone(Buzzer, frequency, duration);
// delay(duration);
// noTone(Buzzer);
// }
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(Buzzer, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if(tryloop > 0){
tone(Buzzer,100);
delay(500);
noTone(Buzzer);
tryloop = tryloop -1;
}
delay(delaytime);
// for (int i = 0; i < 5; i++) {
// playTone(noteFrequencies[i], noteDurations[i]);
// }
// delay(1000);
}