Hello all,
I am experimenting for a while with an Arduino Server sketch and am hitting a wall.
I am using a Wiznet 5100, ethernet and dhcp libs. Power supply is 12V/300mA.
After initial issues with the Reset button and going through the many posts on the forum I finally settled for "bend" option connecting the RESET pin to an available Arduino pin (4) and added the necessary code in the setup() function.
#include <Ethernet.h>
#include <EthernetDHCP.h>
byte mac[] = { 0xDA, 0xAD, 0xBE, 0xAA, 0xFE, 0xED };
#define WIZNET_RESET_PIN 4
Server server = Server(80);
void setup()
{
pinMode(WIZNET_RESET_PIN, OUTPUT);
digitalWrite(WIZNET_RESET_PIN, LOW);
delay(200);
digitalWrite(WIZNET_RESET_PIN, HIGH);
delay(2000);
pinMode(WIZNET_RESET_PIN, INPUT);
if (EthernetDHCP.begin(mac) == 1) {
server.begin();
}
}
void loop() {
Client client = server.available();
if (client) {
server.print("HTTP/1.0 200 OK\r\nServer: Arduino\r\nContent-Type: text/html\r\n\r\n");
server.print("<HTML><HEAD><TITLE>Arduino</TITLE></HEAD>");
server.print("<BODY>");
server.print("<b>Welcome to Arduino!</b>
");
server.print("Uptime: ");
server.print(millis());
server.print(" ms.</BODY></HTML>");
delay(10);
client.stop();
}
}
Unfortunately, after a few seconds of inactivity, the modules go into a state with "L" LED blinking and mad flickering of the TX/RX LEDs on the Arduino.
I had tried before the capacitor with one and two 100nF which didn't work for me.
Could this be related to the watchdog timer or would I be luckier just ordering a new Ethernet shield? What concerns me is that the jumpering trick seems to have worked for most. Perhaps there's also another problem with the code?
TIA for additional hints.