#includevoid setup() { IPAddress myIP(192, 168, 1, 1); Serial.begin(9600); Serial.println(myIP); } void loop() { }
#includeThis code creates two IPAddress objects and compares them. It prints whether they are equal or not. The IPAddress class is part of the standard Arduino library. It does not require any additional package or library.void setup() { IPAddress myIP1(192, 168, 1, 1); IPAddress myIP2(192, 168, 1, 2); if (myIP1 == myIP2) { Serial.println("IP addresses are equal"); } else { Serial.println("IP addresses are not equal"); } } void loop() { }