Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicciniamh/wifintp
NTP Class Library for Arduino/ESP8266
https://github.com/nicciniamh/wifintp
Last synced: about 1 month ago
JSON representation
NTP Class Library for Arduino/ESP8266
- Host: GitHub
- URL: https://github.com/nicciniamh/wifintp
- Owner: nicciniamh
- License: gpl-3.0
- Created: 2016-05-06T13:59:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-17T09:40:49.000Z (over 6 years ago)
- Last Synced: 2023-08-16T20:52:56.881Z (over 1 year ago)
- Language: C++
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is my NTP library for Arduino. Please note the examples used are written
for a WeMos D1 which uses an ESP8266 for the processor. YMMV.General usage is:
WifiNTP ntp;
ntp.begin();
ntp.time();This will, if you're connected to wifi, get UTC from time server(s).
Methods:
ntp.begin() - Basic init of functions, use default servers.
ntp.begin(long tzadjust) - Initialize functions and set the timezone adjustment, in seconds. Use default servers.
ntp.begin(char ** ntpServers) - Init functions with null terminated array of pointers to time
servers in dotted quad notation. A max of 4 will be used in round robin.
ntp.time(tzadjust) - Return time, adjusting for timezone seconds. Use -1 or void for no adjustment.
Please note the actual UDP NTP Code I used is by [Michael Margolis](http://www.gv.com/team/michael-margolis/) and [Tom Igoe](http://www.tigoe.net) in the Arduino WiFi library. That code states it is public domain. Thanks, guys!