#define BLYNK_TEMPLATE_ID "TMPL6-RQtykpx"
#define BLYNK_TEMPLATE_NAME "ESP32"
#define BLYNK_AUTH_TOKEN "7MlvA5ykVWbmwTum_YclLsm-BNV3jUNY"
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char auth[] = "7MlvA5ykVWbmwTum_YclLsm-BNV3jUNY";
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
#define BLYNK_PRINT Serial
BlynkTimer timer;
const int potPin = 34; // Changed to GPIO 34
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
}
void loop() {
int potValue = analogRead(potPin);
Serial.println(potValue);
if (potValue > 2068) {
Serial.println("Warning: Potentiometer value exceeded 2068");
Blynk.logEvent("accident");
}
Blynk.virtualWrite (V0 , potPin);
Blynk.run();
timer.run();
}