#include <SPI.h>
#include <EthernetV2_0.h>
// Enter a MAC address for your controller below.
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// CS pin of W5200 Controller
#define W5200_CS 10
// CS pin of SD card
#define SDCARD_CS 4
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
// The SD card and ethernet controller use the same SPI port.
// We need to make sure that the SD card is deselected by setting the SD card CS pin to HIGH
pinMode(SDCARD_CS,OUTPUT);
digitalWrite(SDCARD_CS,HIGH);//Deselect the SD card
// loop until we get a connection
while(Ethernet.begin(mac)==0){
Serial.println("DHCP configuration failed");
}
// connected to router.
Serial.println("DHCP configuration succeeded");
Serial.println(Ethernet.localIP()); // Display the Ethernet shield's local IP address
}
void loop() {
}