(I edited your post to put three ``` before and after the code block for formatting)
Is it possible that you are not triggering the interrupt for it to connect? Can you change D7 to turn on or off in your connect() function to make sure it’s triggering properly?
Is there a way to start the loop no matter if there is no wifi without using any interrupt? For example when the Core is powered on to start the loop while the core is searching for wifi?
something like this.
#include "elapsedMillis/elapsedMillis.h"
elapsedMillis event1;
SYSTEM_MODE(SEMI_AUTOMATIC);
void setup()
{
pinMode(D7, OUTPUT);
WiFi.connect();
}
void loop()
{
digitalWrite(D7, HIGH);
delay(500);
digitalWrite(D7, LOW);
delay(500);
if (event1 > 20000)
if (WiFi.ready())
{
// Do this
}
else
{
//do something else
}
}