RTC_ESP32_NTP1

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jollybv
Posts: 125
http://meble-kuchenne.info.pl
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

RTC_ESP32_NTP1

Post 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)

mnfisher
Valued Contributor
Posts: 938
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 502 times

Re: RTC_ESP32_NTP1

Post 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

jollybv
Posts: 125
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: RTC_ESP32_NTP1

Post 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.
RTC Compile fail 1.txt
(25.27 KiB) Downloaded 61 times
ESP32_RTC_NTP_Example.fcfx
(14.37 KiB) Downloaded 61 times

mnfisher
Valued Contributor
Posts: 938
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 502 times

Re: RTC_ESP32_NTP1

Post 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

jollybv
Posts: 125
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: RTC_ESP32_NTP1

Post 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)

RTC Compile fail 1.txt
(25.25 KiB) Downloaded 58 times

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: RTC_ESP32_NTP1

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

RTC_ESP32.fcfx
(14.43 KiB) Downloaded 63 times

jollybv
Posts: 125
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: RTC_ESP32_NTP1

Post by jollybv »

Hi Ben

Thanks the time is working like a dream.

Post Reply