There is a warning about not using Ethernet.begin(), what about if EthernetDHCP.begin() is unable to obtain a lease?
seems that something like the following would allow a fall back ip address if there is no DHCP server to talk to.
boolean DHCPconnection=true;
void setup()
if (EthernetDHCP.begin(mac)==0){
Ethernet.begin(mac, defaultip, defaultgateway, defaultsubnet)
DHCPconnection=false;
}
void loop()
if(DHCPconnection) {
EthernetDHCP.maintain()
}
I don't know if the DHCP library sets things in the Ethernet library such that I can't do this? I'm writing the code ahead of getting my ethernet shield, but I wanted to know if there might be any issues with the above code.