Ethernet.localIP()
Description
Obtains the IP address of the 86Duino. Useful when the address is auto assigned through DHCP.
Syntax
Ethernet.localIP();
Parameters
none
Returns
the IP address
Example
#include <Ethernet.h>
void setup() {
  // start the serial library:
  Serial.begin(9600);
  // start the Ethernet connection:
  if (Ethernet.begin() == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    for(;;)
      ;
  }
  // print your local IP address:
  Serial.println(Ethernet.localIP());
}
void loop() {
}
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
