mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Fix for issue 62, adding DHCP support. New begin() method added to EthernetClass which takes just a MAC address and gets the rest of its configuration information via DHCP. Examples updated to use the IPAddress class and some have been changed to get their config via DHCP.
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
// Enter a MAC address and IP address for your controller below.
|
||||
// The IP address will be dependent on your local network:
|
||||
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
||||
byte ip[] = { 192,168,1, 177 };
|
||||
IPAddress ip(192,168,1, 177);
|
||||
|
||||
// Initialize the Ethernet server library
|
||||
// with the IP address and port you want to use
|
||||
@ -79,4 +79,4 @@ void loop()
|
||||
// close the connection:
|
||||
client.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user