ESP32 Clock Component

Post Reply
mnfisher
Valued Contributor
Posts: 436
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 55 times
Been thanked: 250 times

ESP32 Clock Component

Post by mnfisher »

Adding the ESP32 with NTP component introduces a lot of compilation errors. With just Initialise called...

timeinfo not found is the main issue..
../main/esp-project.c: In function 'FCD_04251_RTC_ESP32_NTP1__GetMins':
../main/esp-project.c:455:16: error: 'timeinfo' undeclared (first use in this function); did you mean 'fminf'?
return (FCR_RETVAL);
^~~~~~
fminf
../main/esp-project.c: In function 'FCD_04251_RTC_ESP32_NTP1__GetTimeString':
../main/esp-project.c:488:15: error: 'timeinfo' undeclared (first use in this function); did you mean 'fminf'?

^
fminf
../main/esp-project.c: In function 'FCD_04251_RTC_ESP32_NTP1__SetDate':
../main/esp-project.c:580:3: error: 'timeinfo' undeclared (first use in this function); did you mean 'fminf'?
Martin

BenR
Matrix Staff
Posts: 1106
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 281 times
Been thanked: 377 times

Re: ESP32 Clock Component

Post by BenR »

Hi Martin,

The example here is building correctly for me using the latest library updates.
https://www.flowcode.co.uk/wiki/index.p ... _(Storage)

Please can you give that a try. I can also look at your project if you attach it to the forums.

mnfisher
Valued Contributor
Posts: 436
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 55 times
Been thanked: 250 times

Re: ESP32 Clock Component

Post by mnfisher »

Hi Ben,

This is the sample that 'fails' -
clock.fcfx
(6.73 KiB) Downloaded 61 times
- I see from another example that I need to add a timeinfo in supplementary code - which is easy enough.

The sample above opens as a 'text' listing in Edge (- so I can copy and save, but still odd and a little disconcerting?) I see this uses the supplementary code too:-)

Martin

BenR
Matrix Staff
Posts: 1106
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 281 times
Been thanked: 377 times

Re: ESP32 Clock Component

Post by BenR »

Thanks Martin,

Aha maybe I've missed something. I'll get that supplementary code added into the component so it's not needed.

BenR
Matrix Staff
Posts: 1106
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 281 times
Been thanked: 377 times

Re: ESP32 Clock Component

Post by BenR »

This should be all fixed for you now via the latest library updates, thanks again for letting us know.

chipfryer27
Valued Contributor
Posts: 154
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 109 times
Been thanked: 83 times

Re: ESP32 Clock Component

Post by chipfryer27 »

Hi

Just starting to explore the ESP and so far so good. Minor issue in getting the toolchain to work but all good and flash test worked perfectly. Downloading Ben's ESP_Config_WiFi to allow me to set a specific SSID and Password worked a treat too.

Following on from that I thought it would be a good idea to try and sync the ESP RTC with a timeserver which lead me to this thread. However in the Wiki page Ben links to above, when you click on the example file it doesn't download a file, instead it opens up a page displaying code.

Regards

Post Reply