martinayotte wrote:Code: Select allIPAddress ipaddr;
if (WiFi.hostByName("google.com", &ipddr) = 1) {
Serial.println(String("IP is ") + ipaddr);
}
&ipaddr is wrong here. The function signature you posted above is using a C++ reference to the IPAddress object, not a pointer. So if you use &ipaddr the argument has the wrong type (IPAddress* instead of IPAddress).
The function call should read
WiFi.hostByName("google.com", ipddr)
There's also a typo in the comparison ("= 1" instead of "== 1").