WebThingsIO / webthing-arduino

Simple server for ESP8266, ESP32, Ethernet, or WiFi101-compatible boards compliant with Mozilla's proposed WoT API
Mozilla Public License 2.0
207 stars 78 forks source link

Monitor shows strange number instead of IP #49

Closed novski closed 4 years ago

novski commented 5 years ago

I was able to build the LED.ino example successfully and upload it but the Monitor show's a strange number instead of a dot separated IP. I searched the web and found a different calculation. Added that and got this: bildschirmfoto 2019-01-28 um 23 21 30 Added that to the setup:

// print your WiFi shield's IP address:
IPAddress ip = WiFi.localIP(); 
Serial.print("IP Address: ");
Serial.println(IpAddress2String(ip)); 

And that as function:

String IpAddress2String(const IPAddress ipAddress)
{
    return String(ipAddress[0]) + String(".") +\
      String(ipAddress[1]) + String(".") +\
      String(ipAddress[2]) + String(".") +\
      String(ipAddress[3]) ;
}

bildschirmfoto 2019-01-28 um 23 26 34

Does anywone have the same issue?