// -----------------------------------------------------------------------------------------------------------------------------
// Sound related functions

// sound/buzzer
void soundAlert() {
  if (soundEnabled) {
    #if BUZZER == ON
      digitalWrite(TonePin,HIGH); buzzerDuration=100;
    #endif
    #if BUZZER >= 0
      tone(TonePin,BUZZER,1000);
    #endif
  }
}

// sound/beep
void soundBeep() {
  if (soundEnabled) {
    #if BUZZER == ON
      digitalWrite(TonePin,HIGH); buzzerDuration=25;
    #endif
    #if BUZZER >= 0
      tone(TonePin,BUZZER,250);
    #endif
  }
}

// sound/beep1//2023
void soundBeep1() {
      tone(TonePin,BUZZER,250);
}

// sound/click
void soundClick() {
  if (soundEnabled) {
    #if BUZZER == ON
      digitalWrite(TonePin,HIGH); buzzerDuration=5;
    #endif
    #if BUZZER >= 0
      tone(TonePin,BUZZER,50);
    #endif
  }
}


void soundAlert1() {
  if (soundEnabled) {
    #ifdef BUZZER_ON
      digitalWrite(TonePin,HIGH); buzzerDuration=100;
    #endif
    #ifdef BUZZER
      tone(TonePin,900,250);
    #endif
  }
}

void soundAlert2() {
  if (soundEnabled) {
    #ifdef BUZZER_ON
      digitalWrite(TonePin,HIGH); buzzerDuration=100;
    #endif
    #ifdef BUZZER
      tone(TonePin,1100,250);
    #endif
  }
}

void soundAlert3() {
  if (soundEnabled) {
    #ifdef BUZZER_ON
      digitalWrite(TonePin,HIGH); buzzerDuration=100;
    #endif
    #ifdef BUZZER
      tone(TonePin,1300,250);
    #endif
  }
}

void soundAlert4() {
  if (soundEnabled) {
    #ifdef BUZZER_ON
      digitalWrite(TonePin,HIGH); buzzerDuration=100;
    #endif
    #ifdef BUZZER
      tone(TonePin,1500,250);
    #endif
  }
}


void soundAlert5() {
  if (soundEnabled) {
    #ifdef BUZZER_ON
      digitalWrite(TonePin,HIGH); buzzerDuration=100;
    #endif
    #ifdef BUZZER
      tone(TonePin,1800,250);
    #endif
  }
}
void soundError() {
  if (soundEnabled) {
    #ifdef BUZZER_ON
      tone(TonePin,150,1000);
    #endif
    #ifdef BUZZER
      tone(TonePin,150,1000);
    #endif
  }
}
