#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
#define BLYNK_TEMPLATE_ID "TMPL3T12a-kIl"
#define BLYNK_TEMPLATE_NAME "IOT"
#define BLYNK_AUTH_TOKEN "1JZ6RGx5OUfN1_Ho2xsCET5gyKWhJQB0"
int buzzer = 5;
void setup() {
pinMode(buzzer, OUTPUT);
// Connect to Wi-Fi
WiFi.begin("YourWiFiSSID", "YourWiFiPassword");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
// Initialize Blynk
Blynk.begin(BLYNK_AUTH_TOKEN, WiFi);
}
void loop() {
Blynk.run();
// Your buzzer code here
tone(buzzer, 1000);
delay(100);
tone(buzzer, 20);
delay(110);
tone(buzzer, 3);
delay(100);
tone(buzzer, 6760);
delay(110);
tone(buzzer, 100);
delay(100);
tone(buzzer, 880);
delay(100);
tone(buzzer, 3);
delay(100);
tone(buzzer, 67);
delay(100);
}