#define BLYNK_TEMPLATE_ID "TMPL4A1jYkTSB"
#define BLYNK_TEMPLATE_NAME "wokwi"
#define BLYNK_AUTH_TOKEN "your_auth_token"
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
BlynkTimer timer;
void myTimerEvent() {
int read_value = analogRead(15);
float voltage = read_value * (3.3 / 4096.0);
// Serial.println("read_value = " + String(read_value));
// Serial.println("voltage = " + String(voltage) + "V");
// delay(100);
Blynk.virtualWrite(V0, voltage);
}
void setup() {
Serial.begin(115200);
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
timer.setInterval(3000L, myTimerEvent);
}
void loop() {
Blynk.run();
timer.run();
}