Hello.
I'm programming an ESP32 module using the Arduino IDE, as I'm building a model of an automated house.
I would like to know if there is any way to program the ESP32 to start with all the LEDs on "in case the module does not find or is unable to establish a connection to the Wifi network".
#define BLYNK_TEMPLATE_ID "fsdfdsfsdfsdfsdfsd"
#define BLYNK_TEMPLATE_NAME "fsdfsdfsdfsd"
#define BLYNK_AUTH_TOKEN "fsdfsdfsdfsdfsdfsdfsd"
#define BLYNK_PRINT Serial
#include "WiFi.h"
#include "WiFiClient.h"
#include "BlynkSimpleEsp32.h"
char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = "aaaaa";
char pass [] = "bbbbb";
int led0 = 13;
int led1 = 12;
int led2 = 14;
int led3 = 27;
BLYNK_WRITE (V0) {
int value = param.asInt();
digitalWrite (led0, value);
}
BLYNK_WRITE (V1) {
int value = param.asInt();
digitalWrite (led1, value);
}
BLYNK_WRITE (V2) {
int value = param.asInt();
digitalWrite (led2, value);
}
BLYNK_WRITE (V3) {
int value = param.asInt();
digitalWrite (led3, value);
}
void setup() {
Serial.begin (115200);
Blynk.begin(auth, ssid, pass);
pinMode (led0, OUTPUT);
pinMode (led1, OUTPUT);
pinMode (led2, OUTPUT);
pinMode (led3, OUTPUT);
}
void loop() {
Blynk.run();
}
Thank you very much in advance!!