Clock-Library for esp8266 with SNTP support
This project needs the Arduino environment for the ESP8266 chip: https://github.com/esp8266/Arduino.git
It provides an instance of a clock, which is derived from the Ticker library see: http://arduino.esp8266.com/stable/doc/reference.html#ticker
The clock has an API with following functions:
begin()
set params and retrieve time with: timeServerName, timezone, daylightgetTimeSeconds()
get time in secondsgetTimeStruct()
get a time structur (see Time.h)getTimeStr()
get a string with current time13:50:59
getDateTimeStr()
get a string with date and time2015-10-28 13:50:59
getSecond()
get the current time secondsattachCb()
attach a callback function with a timestamp, when to callbackdetachCb()
detach the callback function
This libraray uses time functions from the esp8266 SDK. Therefore, no separate NTP network calls are required.
The library is based on the work of https://github.com/esp8266/Arduino.git