Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: Ethernet sheild stops connecting after an extended period on: September 25, 2012, 08:55:07 am
i have same problem,
if you connectinc using DHCP , connection drops after 60 minuts
its easily fix problem
You need to use Ethernet.maintain() every 15-30 minuts


Code:
unsigned long previousMillis = 0;
int interval = 900000;

void loop()
{
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval)
  {
    previousMillis = currentMillis;
    Ethernet.maintain();
    delay(100);
  }
}
Pages: [1]