Arduino Sketch
Budget: €30 – €250 EUR
Arduino sketch to get time form Internet
The board as Ethernet port (Wiznet 5500), AT24CMAC402 EEPROM (to get MAC adress and store variables) and RTC (DS1307)
We we need:
1. Initialize the Ethernet interface using the EEPROM stored MAC
2. Use the timezone lib to get the time from NTP server
3. Update the DS1307 and set a flag (inSync=true)
4. Send the time to the serial port
Notes:
The time must be read from DS1307, so it can output time even if not syncronized.
If it cannot get the time form NTP server, the inSync Variable must be set to false (after a few tries of course)
The timezone, daylight saving and ntp server must be configurable and stored in EEPROM
This variables must be set using the Ethernet port.
The board as Ethernet port (Wiznet 5500), AT24CMAC402 EEPROM (to get MAC adress and store variables) and RTC (DS1307)
We we need:
1. Initialize the Ethernet interface using the EEPROM stored MAC
2. Use the timezone lib to get the time from NTP server
3. Update the DS1307 and set a flag (inSync=true)
4. Send the time to the serial port
Notes:
The time must be read from DS1307, so it can output time even if not syncronized.
If it cannot get the time form NTP server, the inSync Variable must be set to false (after a few tries of course)
The timezone, daylight saving and ntp server must be configurable and stored in EEPROM
This variables must be set using the Ethernet port.