-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
Hardware
Hardware: ESP-12
Core Version: 2.3.0
Description
No WiFi connect since 2.3.0 if "delay >= 1000" in setup() for init of external hardware.
After upgrading to 2.3.0 many sketches wont connect anymore to WiFi Accesspoint.
Testing a few things showed up that the problem was caused by adding a delay(1000) in setup before WiFi.begin().
This was done to power up external hardware properly before starting the Arduino/ESP Code and connecting the WiFi.
After downgrading to 2.2.0 everything works fine again using this delay.
Settings in IDE
Module: Wemos D1 R2 & mini
Flash Size: 4MB/3MB
CPU Frequency: 80Mhz
Sketch
#include <ESP8266WiFi.h>
char ssid[50] = "your ssid";
char password[50] = "your pwd";
void setup() {
Serial.begin(9600);
delay(1000); // for ext. hardware init <<<<<<<<<<<
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
delay(1000);
Serial.println("X");
}