Hi,
I have test with 0018 the sketch "arduino.cc/playground/Code/WebServer" and it works properly on 328 and in 1280 but i have try to implement the time library on it and every time that i call for a page on explorer , the time is reset ( time starts on 00:00:00 again). Any idea?
(with the webserver example of the ethernet library works OK)
Part with the clock Code added:
/*************************************************************************************************************************************************
- Shared variable
*************************************************************************************************************************************************/
Server server(80);
unsigned long ulWd = 0; //cicle
//view clock
void digitalClockDisplay(){
// digital clock display of the time
Serial.print(hour());
printDigits(minute());
printDigits(second());
Serial.print(" ");
Serial.print(day());
Serial.print(" ");
Serial.print(month());
Serial.print(" ");
Serial.print(year());
Serial.println();
}
void printDigits(int digits){
// utility function for digital clock display: prints preceding colon and leading 0
Serial.print(":");
if(digits < 10)
Serial.print('0');
Serial.print(digits);
}
void wd()
{
ulWd++;
if( ulWd == 20000 )
{
digitalClockDisplay(); //print clock
ulWd = 0;
}
}
void setup() {
Ethernet.begin(mac, ip);
server.begin();
Serial.begin(9600); // DEBUG
}
/*************************************************************************************************************************************************
- Main loop
*************************************************************************************************************************************************/
void loop() {
wd(); // print clock
Client client = server.available();
.........................
Regards