Print local_ip on ESP8266 standalone (v0.2.5-beta)

The local_ip is printed in ArduinoEthernet but is not printed in the ESP8266 projects.

I added it to the (v0.2.5-beta) BlynkSimpleEsp8266.h file (only the last two commands)

void connectWiFi(const char* ssid, const char* pass)
{
    BLYNK_LOG("Connecting to %s", ssid);
    if (pass && strlen(pass)) {
    	WiFi.begin(ssid, pass);
    } else {
    	WiFi.begin(ssid);
    }
    while (WiFi.status() != WL_CONNECTED) {
        ::delay(500);
    }
    BLYNK_LOG("Connected to WiFi");
	
    IPAddress myip = WiFi.localIP();
    BLYNK_LOG("My IP: %d.%d.%d.%d", myip[0], myip[1], myip[2], myip[3]);
}

Have fun,
CaptBlaubaer

3 Likes

Thx… I’ll add it…