Answers for "localIPto string arduino"

C
1

arduino ip to string

//IP addresses are stored as an array, you can just say

IPAddress my_IPAddress(162.198.2.3);
Serial.println(my_IPAddress[1]);

//Output
--------------------------------------------------------
 > 198
Posted by: Guest on July-09-2020
0

WiFi.localIP() to string

String ip2Str(IPAddress ip){
  String s="";
  for (int i=0; i<4; i++) {
    s += i  ? "." + String(ip[i]) : String(ip[i]);
  }
  return s;
}
Posted by: Guest on August-06-2020

Code answers related to "C"

Browse Popular Code Answers by Language