Hi
I'm writing and wondering if this is normal that when I run the code to setup the ethernet shield that it takes a minute to execute? I timed it and one minutes pases until the "connected and ip" shows up on serial monitor plus ledYell is on while ethernet is waiting too.
// Ethernet Shield Settings.
//
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
//
// If you don't specify the IP address, DHCP is used (Only in Arduino 1.0 or later).
//
byte ip[] = {192, 168, 0, 10};
void setup()
{
pinMode(ledReady,OUTPUT);
pinMode(ledAlert,OUTPUT);
digitalWrite(ledAlert,LOW);
pinMode(ledError,OUTPUT);
digitalWrite(ledError,LOW);
pinMode(ledYell,OUTPUT);
digitalWrite(ledYell,ON);
pinMode(ledPost,OUTPUT);
digitalWrite(ledPost, LOW);
Serial.begin(115200);
Serial.println(F("Starting Ethernet in 1 min"));
if (!Ethernet.begin(mac)) // Try to connect using DHCP
Ethernet.begin(mac, ip); // Try to connect using a Static IP address.
Serial.print(F("Connected to IP address: ")); // Print out the IP address.
for (int i = 0; i < 3; i++)
{
Serial.print(Ethernet.localIP()[i], DEC);
Serial.print(".");
}
Serial.println(F(" Ethernet ready"));
Serial.println();
digitalWrite(ledYell,OFF);
Zoomkat
I'm a dumb ass, Your code took a minute to fail also. I didn't have a ethernet cable plugged in since I was using static ip, I didn't think it mattered. With a ethernet cable your code and mine works in 5 seconds.
Thanks for the test code and the time you took to reply to me I appreciate it!
Thank you
Don