#define BLYNK_PRINT Serial

#define BLYNK_TEMPLATE_ID "TMPL6kQqrFm4N"
#define BLYNK_TEMPLATE_NAME "Basic Blynk"
#define BLYNK_AUTH_TOKEN "LuFuz79S0sPXsdf21hrdD5fa9qWa9mD_"


#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

int pinLED = 12;

char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = "Wokwi-GUEST"; //ganti sesuai hotspot/wifi yang tersedia
char pass[] = "";

BLYNK_WRITE(V0)
{
 int pinValue = param.asInt();
 digitalWrite(pinLED, pinValue);
}

void setup() {
  Serial.begin(115200);
  Blynk.begin(auth, ssid, pass);
  pinMode(pinLED, OUTPUT);
}

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