#include <Arduino.h>
#define SW1     32
#define SW2     33
#define BUZZER  13

void buzzer_beep(int times)
{
  for (int _i = 0; _i < times; _i++)
  {
    #define dt 50 // 0.1sec
    int _j;
    for (_j = dt; _j > 0; _j--)
    {
      digitalWrite(BUZZER, HIGH);
      vTaskDelay(1);
      digitalWrite(BUZZER, LOW);
      vTaskDelay(1);
    }
    vTaskDelay(100);
  }
}


void setup() {
  Serial.begin(115200);
  pinMode(SW1,INPUT);
  pinMode(SW2,INPUT);
  pinMode(BUZZER,OUTPUT); 
  Serial.println("*** Start Program ***");
  }

void loop() {

  if(!digitalRead(SW1))
  {
    buzzer_beep(1);
    delay(1000);
  }

  if(!digitalRead(SW2))
  {
    buzzer_beep(2);
    delay(1000);
  }
}
NOCOMNCVCCGNDINLED1PWRRelay Module