Best NTP-Time libraray for ESP32?

rin67630
Posts: 99
Joined: Sun Mar 11, 2018 5:13 pm

Best NTP-Time libraray for ESP32?

Postby rin67630 » Mon Mar 19, 2018 10:22 am

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

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Best NTP-Time libraray for ESP32?

Postby WiFive » Mon Mar 19, 2018 10:39 am


rin67630
Posts: 99
Joined: Sun Mar 11, 2018 5:13 pm

Re: Best NTP-Time libraray for ESP32?

Postby rin67630 » Mon Mar 19, 2018 5:38 pm

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...

Piquan
Posts: 3
Joined: Mon Mar 12, 2018 10:52 pm

Re: Best NTP-Time libraray for ESP32?

Postby Piquan » Sat Mar 24, 2018 8:28 pm

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.

rin67630
Posts: 99
Joined: Sun Mar 11, 2018 5:13 pm

Re: Best NTP-Time libraray for ESP32?

Postby rin67630 » Wed Mar 28, 2018 7:49 am

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?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Best NTP-Time libraray for ESP32?

Postby WiFive » Wed Mar 28, 2018 8:33 am

Are you saying this doesn't work https://github.com/espressif/arduino-es ... leTime.ino ?

Post about Arduino in Arduino subforum please.

rin67630
Posts: 99
Joined: Sun Mar 11, 2018 5:13 pm

Re: Best NTP-Time libraray for ESP32?

Postby rin67630 » Thu Mar 29, 2018 9:29 am

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.

Who is online

Users browsing this forum: Baidu [Spider] and 99 guests