Smart Home Switch Board
Posted: Fri Jun 04, 2021 4:20 pm
Frontboard PC is detecting board can uplaod any program but ESP32 goes in boot loop, unstable.
Backpanel board is not getting enough power by HLK-40M12 then LM2596T 5.0V, some Solid State Relay is on by default and some are not supplying output even HIGH by command.
need help
Any ESP32 example codes i uploads noting happens on serial monitor & after pressing Reset button it gives the same error on every code
Error code on Serial Monitor
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UARz⸮IQ⸮/SDIO_REI_REO_V2))
waiting for download
ets Jun 8 2016 00:22:57
The example code is
#include <WiFi.h>
#include "time.h"
const char* ssid = "Aadi2910";
const char* password = "Stuti0908";
const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 3600;
const int daylightOffset_sec = 3600;
void printLocalTime()
{
struct tm timeinfo;
if(!getLocalTime(&timeinfo)){
Serial.println("Failed to obtain time");
return;
}
Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S");
}
void setup()
{
Serial.begin(115200);
//connect to WiFi
Serial.printf("Connecting to %s ", ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println(" CONNECTED");
//init and get the time
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
printLocalTime();
//disconnect WiFi as it's no longer needed
WiFi.disconnect(true);
WiFi.mode(WIFI_OFF);
}
void loop()
{
delay(1000);
printLocalTime();
}