#define BLYNK_TEMPLATE_ID "TMPL6CIdkKcaU"
#define BLYNK_TEMPLATE_NAME "PROJEK"
#define BLYNK_AUTH_TOKEN "rvXsvGRHuB5KRVjRX4ts4vLH0Laib26Z"
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char auth[] = "rvXsvGRHuB5KRVjRX4ts4vLH0Laib26Z";
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
BLYNK_WRITE(V0)
{
int pinValue = param.asInt();
if (pinValue == 1)
{
digitalWrite(23, HIGH);
}
else {
digitalWrite(23, LOW);
}
}
BLYNK_WRITE(V1)
{
int pinValue = param.asInt();
if (pinValue == 1)
{
digitalWrite(22, HIGH);
}
else {
digitalWrite(22, LOW);
}
}
BLYNK_WRITE(V2)
{
int pinValue = param.asInt();
if (pinValue == 1)
{
digitalWrite(19, HIGH);
}
else {
digitalWrite(19, LOW);
}
}
void setup()
{
Serial.begin(115200);
pinMode(22, OUTPUT);
pinMode(23, OUTPUT);
pinMode(15, OUTPUT);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}