Calling UDP.begin() before connection is completed
Posted: Thu Dec 21, 2017 11:28 am
Can I call UDP.begin() before waiting on the WiFi to be properly connected? Most of the examples I see wait for the WiFi to connect, but I'm wondering if it's necessary.
For example, I would like to do this instead :
in setup() :
WiFi.mode(WIFI_STA); //Station mode
WiFi.disconnect();
WiFi.begin(APName,"12348756"); //Connect to AP
UDP.begin(localPort);
And check in loop() to blink the led for the connection status, allowing my main program to start running right away.
Thank you
For example, I would like to do this instead :
in setup() :
WiFi.mode(WIFI_STA); //Station mode
WiFi.disconnect();
WiFi.begin(APName,"12348756"); //Connect to AP
UDP.begin(localPort);
And check in loop() to blink the led for the connection status, allowing my main program to start running right away.
Thank you