BTW, I dug a little further. It’s rebooting in WiFi.begin(), and I’m guessing the watchdog but don’t know for sure.
However, when powered by a little apple power brick it works fine. Only when powered via the board pins does it reboot in WiFi.begin() which is a little odd!
Thanks in advance for any advice! Here’s the code - it doesn’t make it to STEP3.
If I remove the USB cable -AFTER- it’s connected to WiFi, it will CONTINUE to run from being powered by the VIN pin.
void ConnectToWiFi(const char * pszSSID, const char * pszPassword)
lcdTop.setCursor(0, 0); lcdTop.print(“STEP1”);
// attempt to connect to Wifi network:
unsigned long start = millis();
int status = WL_DISCONNECTED;
while (false == WiFi.isConnected())
lcdTop.setCursor(0, 0); lcdTop.print(“STEP2”);
Serial.print("Attempting to connect to SSID: ");
// Connect to WPA/WPA2 network.
char * psz = const_cast<char *>(pszSSID);
status = WiFi.begin(psz, pszPassword);
for (int i = 0; i < 20; i++)
lcdTop.setCursor(0, 0); lcdTop.print(“STEP3”);
sprintf(szStatus, “%s: %s-%d”, pszSSID, FriendlyTimeSpan(start, millis()).c_str(), status);
lcdTop.setCursor(0, 0); lcdTop.print(“STEP4”);