• I think that's as expected. wifi.getIP returns almost immediately, and only calls the callback when the ESP8266 responds with the IP address. It means that the callback won't have got called by the time your console.log calls execute, and the IP will stay empty.

    ... if we could get the IP address immediately, wifi.getIP could have returned it directly, rather than faffing with the callbacks :)

About

Avatar for Gordon @Gordon started