#define BLYNK_TEMPLATE_ID "TMPL6fNfnEtdf"
#define BLYNK_TEMPLATE_NAME "KONTROL LAMPU JARAK JAUH"
#define BLYNK_AUTH_TOKEN "Q_gyyLWoVmh5Op1497uH_2H2mG3ueJqD"

//Pemanggilan fungsi
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

////setting wifi

char ssid[] = "Wokwi-GUEST";
char passw[] ="";

//fungsi tomnol
BLYNK_WRITE(V1)
{
   int tombol = param.asInt();
   if (tombol ==1)
  {
    digitalWrite(14, HIGH);
  }
  if (tombol ==0)
  {
    digitalWrite(14, LOW);
  }
  }

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Blynk.begin(BLYNK_AUTH_TOKEN,ssid,passw);

  pinMode(14, OUTPUT);
}

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