#define BLYNK_TEMPLATE_ID "TMPL6_z_YUmKH"
#define BLYNK_TEMPLATE_NAME "esp32"
#define BLYNK_AUTH_TOKEN "M12OeVPCJFlAkgvADC9a00o_WML4DDtA"
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
//BlynkTimer timer;
int value; ////red
int value1; ////blue
BLYNK_WRITE(V0)///////////// red
{
value = param.asInt();
//Blynk.virtualWrite(V1, value);
}
BLYNK_WRITE(V1)/////////////// blue
{
value1 = param.asInt();
//Blynk.virtualWrite(V1, value);
}
void setup()
{ Serial.begin(115200);
pinMode(2, OUTPUT); ////red
pinMode(4, OUTPUT); ////blue
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
//timer.setInterval(1000L, myTimerEvent);
}
void loop()
{ Blynk.run();
//timer.run();
digitalWrite(2, value);
digitalWrite(4, value1);
}
/*BLYNK_CONNECTED()
{
Blynk.setProperty(V3, "offImageUrl", "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations.png");
Blynk.setProperty(V3, "onImageUrl", "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations_pressed.png");
Blynk.setProperty(V3, "url", "https://docs.blynk.io/en/getting-started/what-do-i-need-to-blynk/how-quickstart-device-was-made");
}
void myTimerEvent()
{
Blynk.virtualWrite(V2, millis() / 1000);
}*/