Page 1 of 1

Best NTP-Time libraray for ESP32?

Posted: Mon Mar 19, 2018 10:22 am
by rin67630
Hi experts here,
we have got many NTP-time libraries available. Most of them come from the Arduino world, some from the ESP 8266.
As I have understood the ESP32 has an own RTC built in, so a specific library would be better than one of the above mentioned, isn't it?

Does that one exist?
Regards

Re: Best NTP-Time libraray for ESP32?

Posted: Mon Mar 19, 2018 10:39 am
by WiFive

Re: Best NTP-Time libraray for ESP32?

Posted: Mon Mar 19, 2018 5:38 pm
by rin67630
Thank you.
That looks good, albeit the given code do not yet seem to be a directly usable library as we are used to...

I hope somebody with more skills than me, will provide soon an OOB clock example...

Re: Best NTP-Time libraray for ESP32?

Posted: Sat Mar 24, 2018 8:28 pm
by Piquan
That's the point. There's an SNTP library already in the ESP-IDF, as part of lwIP. In the example linked above, initialize_sntp shows the calls to the library.

Re: Best NTP-Time libraray for ESP32?

Posted: Wed Mar 28, 2018 7:49 am
by rin67630
I am stupidly programming over the Arduino IDE. Is it a hero there who could port the SNTP exmple to that environment. IMHO the NTP example given in the Arduino IDE ist not the right one. Is it?

Re: Best NTP-Time libraray for ESP32?

Posted: Wed Mar 28, 2018 8:33 am
by WiFive
Are you saying this doesn't work https://github.com/espressif/arduino-es ... leTime.ino ?

Post about Arduino in Arduino subforum please.

Re: Best NTP-Time libraray for ESP32?

Posted: Thu Mar 29, 2018 9:29 am
by rin67630
WiFive wrote:Are you saying this doesn't work https://github.com/espressif/arduino-es ... leTime.ino ?

Post about Arduino in Arduino subforum please.
That one works indeed, but the code is hovewer scarcely documented, it's using the time.h lib which refers to timeLib.h...
That is however a developement of year 2011, can it be specifically intended for the ESP32, that came out later?

I am currently can't figure out how to use that undocumented example to use it to run tasks on specific timings.
Polling the getLocalTime routine can't be the right way to use it, is it?

OK I have opened the thread under the Arduino folder.
Thanks for your input.