Page 1 of 1
RTC_ESP32_NTP1
Posted: Sat May 28, 2022 7:43 am
by jollybv
Hi Guys
I'm looking for an example on how to use the ESP Real Time Clock component. I have been to the wiki help page and the download example is not downloading it just opens and shows you the code
https://www.flowcode.co.uk/wiki/index.p ... _(Storage)
Re: RTC_ESP32_NTP1
Posted: Sat May 28, 2022 7:52 am
by mnfisher
This looks like a formatting error on the page. You can copy all the text - save as a file with .fcfx extension and it will open okay. Until the wiki is fixed - hopefully fairly soon?
Martin
Re: RTC_ESP32_NTP1
Posted: Sat May 28, 2022 9:51 am
by jollybv
Thanks Martin
Copping and saving with .fcfx worked but it wont compile just get error the only thing I have don is change the esp device to the esp 32 wroom so no idea why this simple example wont compile.
Re: RTC_ESP32_NTP1
Posted: Sat May 28, 2022 10:07 am
by mnfisher
This has been reported before - there was a problem with the TimeVal structure missing from the component. I'm sure Ben - mentioned fixing this....
There is a working example from Stefan somewhere -
See
https://www.flowcode.co.uk/forums/viewt ... =esp32+ntp
&
https://www.flowcode.co.uk/forums/viewt ... =esp32+ntp
I think the sample I saw originally defined TimeVal in supplementary code - though if it's been added to the component it shouldn't need this..
Martin
Re: RTC_ESP32_NTP1
Posted: Mon May 30, 2022 4:11 pm
by jollybv
Hi guys
I have just downloaded the RTC_ESP32 example from the above thread and it does not seem to want to compile. I have done a full library update with no luck (I'm using the ESP_32 WROOM instead of the Loin32 lite selected in the example).
I'm getting 2 error's
../main/esp-project.c:230:15: error: expected identifier or '(' before string constant
#define TAG "rtc"
../main/esp-project.c: At top level:
../main/esp-project.c:271:6: error: redefinition of 'time_sync_notification_cb'
void time_sync_notification_cb(struct timeval *tv)
Re: RTC_ESP32_NTP1
Posted: Wed Jun 01, 2022 2:12 pm
by BenR
Hello,
Many thanks for letting us know.
I have removed the compilation error for you now and updated the component via the library updates.
I can also confirm that the code in the supplementary code window can also be removed as shown here.
Re: RTC_ESP32_NTP1
Posted: Tue Jun 07, 2022 2:09 pm
by jollybv
Hi Ben
Thanks the time is working like a dream.