#define BLYNK_TEMPLATE_ID "TMPL6rwh4AlJW"
#define BLYNK_TEMPLATE_NAME "Test Sync"
#define BLYNK_AUTH_TOKEN "e-6IeFu0YRiFLynATotvbdCH7J-pi9rr"
#include <BlynkSimpleEsp32.h>

#define DATA  V0

#define SSID  "Wokwi-GUEST"
#define PASS  ""

int data = -1;

BLYNK_CONNECTED() {
  Blynk.syncVirtual(DATA);
}

BLYNK_WRITE(DATA) {
  data = param.asInt();
  Serial.println("Data: " + String(data));
}

void setup() {
  Serial.begin(115200);
  Serial.println("Starting...");
  Serial.println("Data: " + String(data));

  Blynk.begin(BLYNK_AUTH_TOKEN, SSID, PASS);
}

void loop() {
  Blynk.run();
}