IPAddress myip (192, 168, 100, 110); without the =
=====================Original Post===================================
I'm having a problem IP address assignment. I am not doing anything different than I have done before but it seems that it isn't working the way I thought it should.
IPAddress myip = (192, 168, 100, 110);
Serial.println("IP address entered as: IPAddress myip = (192, 168, 100, 110)");
Serial.print("IP address in IPAddress format: ");
Serial.println(myip);
Serial.print("Octet by octet, (myip[x]);: ");
Serial.print(myip[0]);
Serial.print(".");
Serial.print(myip[1]);
Serial.print(".");
Serial.print(myip[2]);
Serial.print(".");
Serial.println(myip[3]);
And the output is the following.
IP address entered as: IPAddress myip = (192, 168, 100, 110)
IP address in IPAddress format: 110.0.0.0
Octet by octet, (myip[x]);: 110.0.0.0
I'm glad to see the 110 but all the rest is wrong. Can anyone explain to me what is wrong with this?