How can i convert a String to IPAddress on arduino / esp ?
etc. "192.168.1.2" -> IPAddress(192, 168, 1, 2)
Tried this
void setup() {
Serial.begin(115200);
IPAddress apip;
const char *apipch;
apipch = "192.168.4.1";
Serial.println(apip.fromString(apipch));
}
void loop() {
// put your main code here, to run repeatedly:
}
But i just get an output "1"
didn't work
... instead saythis is what happened ....
.... "didn't work" is almost meaniglessip.fromString(s.c_str());
Serial.println(apip);