Using DHCP Mode With Arduino and Ethernet Shield
Using DHCP Mode With Arduino and Ethernet Shield
https://sites.google.com/site/coolembeddedlaboratory/home/softwares/using-dhcp-mode-with-
arduino-and-ethernet-shield
//zoomkat 3-1-13
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address
EthernetClient client;
//////////////////////
void setup(){
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
while(true);
Serial.begin(9600);
void loop(){
//////////////////////////
void sendGET() //client function to send/receive GET request data.
Serial.println("connected");
client.println("Host: checkip.dyndns.com");
else {
Serial.println();
Serial.println();
Serial.println("disconnecting.");
Serial.println("==================");
Serial.println();