Hello all,
I bought a CYD (2.4inch_ESP32-2432S024 by Shenzhen Jingcai) from a 3rd party supplier since I had some remaining credit on the website: now I want to try and implement some IoT features with it.
It is very well documented and has a ton of demo sketches to use with the Arduino IDE (my preferred IDE).
I’m trying (and was successful) to connect my ESP32 to my wifi network, but the manner in which has raised questions:
When downloading the sketch (Just pressing upload, not pressing anything on the board: arduino runs through it without problems) the serial monitor will repeat the boot message for 20 minutes after which it suddenly executes the program and starts searching for the wifi network… Why would my ESP32 be stuck in a boot loop and then randomly come out of it? (it says “boot:0x13”, but according to the schematic it is connected to IO0/ pin25, could that also be a problem?)
A different program running the LED light does not do this, and executes normally (1x boot message).
This is the message on the serial monitor:
16:18:14.665 -> rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
16:18:14.707 -> configsip: 0, SPIWP:0xee
16:18:14.707 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
16:18:14.707 -> mode:DIO, clock div:1
16:18:14.707 -> load:0x3fff0030,len:4744
16:18:14.707 -> load:0x40078000,len:15672
16:18:14.707 -> load:0x40080400,len:3152
16:18:14.707 -> entry 0x4008059c
16:18:20.070 -> ets Jul 29 2019 12:21:46
... (repeats until:)
16:37:07.108 -> rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
16:37:07.108 -> configsip: 0, SPIWP:0xee
16:37:07.108 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
16:37:07.108 -> mode:DIO, clock div:1
16:37:07.108 -> load:0x3fff0030,len:4744
16:37:07.108 -> load:0x40078000,len:15672
16:37:07.108 -> load:0x40080400,len:3152
16:37:07.108 -> entry 0x4008059c
16:37:13.550 -> -------------------------Waiting for automatic network configuration...
This is the Github for the CYD
Code ran on Arduino IDE 2.3.6 with ESP32 v3.3.0.
”Tools” settings as per instruction from the github.
#include <Arduino.h>
#include "WiFi.h"
void mySmartWifiConfig()
{
WiFi.mode(WIFI_MODE_STA);
Serial.println("-------------------------Enable smart distribution network:");
WiFi.beginSmartConfig();
while (1)
{
Serial.print(".");
delay(500);
if (WiFi.smartConfigDone())
{
Serial.println("-------------------------Network configuration successful");
Serial.printf("-------------------------SSID:%s", WiFi.SSID().c_str());
Serial.printf("-------------------------PSW:%s", WiFi.psk().c_str());
break;
}
}
}
bool autoConfig()
{
WiFi.disconnect(true,true);
WiFi.begin();
for (size_t i = 0; i < 20; i++)
{
int wifiStatus = WiFi.status();
if (wifiStatus == WL_CONNECTED)
{
Serial.println("-------------------------Automatic connection successful!");
return 1;
}
else
{
delay(1000);
Serial.println("-------------------------Waiting for automatic network configuration...");
}
}
Serial.println("-------------------------Unable to automatically configure the network!");
return 0;
}
void setup()
{
Serial.begin(115200);
delay(5000);
if (!autoConfig())
{
mySmartWifiConfig();
}
}
void loop()
{
if (WiFi.isConnected())
{
Serial.println("-------------------------Network connected");
delay(1000);
}
}



