-->
Page 1 of 1

Can WIFI.CONNECT return success (or not)

PostPosted: Mon Aug 15, 2016 11:47 am
by bugs
With Arduino I can wait util the ESP has connected to my network with something like

if(wifiConnected) {
digitalWrite(ledpin, LOW); //turn led on
}
else {...}

Is there a way to return a success/failure value from BASIC wifi.connect()?

Re: Can WIFI.CONNECT return success (or not)

PostPosted: Mon Aug 15, 2016 9:11 pm
by Mmiscool
Yes. Wifi.connect() and wifi.ap() functions both return a value for success or fail.

Re: Can WIFI.CONNECT return success (or not)

PostPosted: Tue Aug 16, 2016 10:24 am
by bugs
Thanks for quick response.
I will give it a go.
I am trying to detect if connection lost as well so can re-try.