RTC Widget doesn't work with ESP8266

Hi,
I am trying to use the RTC widget from Blynk with my ESP8266 Wifi.
I am using the newest version of Blynk library (0.6.1) and got all the libraries used in the sketch.
Also I got the newest iPhone with the newest software update so I just downloaded Blynk again.

Anyways, somehow my PC, even before uploading, can’t compile the sketch for the ESP8266, not even the example I got directly from the Blynk library.
The only way to make the sketch work is to take out everything that has to do with the Time library and the RTC widget.

I have no idea what is going on there, maybe some of you can help me to make it work.

What exactly does your compiler error message say?

Pete.

So honestly, I can’t really say what the error message tells me, I just learned a bit of coding with Arduino at school and tried to improve my skills.
This is what my IDE outputs me:

In file included from C:\Users\Marco\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta1/tools/sdk/libc/xtensa-lx106-elf/include/string.h:163:0,

             from C:\Users\Marco\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta1\cores\esp8266/Arduino.h:33,

             from C:\Users\Marco\Documents\Arduino\libraries\Time-master\DateStrings.cpp:12:

C:\Users\Marco\Documents\Arduino\libraries\Time-master\DateStrings.cpp: In function ‘char* monthStr(uint8_t)’:

C:\Users\Marco\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta1/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:76:81: error: ‘const void*’ is not a pointer-to-object type

 #define pgm_read_ptr(addr)              (*reinterpret_cast<const void*>(addr))

                                                                             ^

C:\Users\Marco\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta1/tools/sdk/libc/xtensa-lx106-elf/include/sys/string.h:32:57: note: in definition of macro ‘strcpy_P’

#define strcpy_P(dest, src) strncpy_P((dest), (src), SIZE_IRRELEVANT)

                                                     ^

C:\Users\Marco\Documents\Arduino\libraries\Time-master\DateStrings.cpp:72:29: note: in expansion of macro ‘pgm_read_ptr’

 strcpy_P(buffer, (PGM_P)pgm_read_ptr(&(monthNames_P[month])));

                         ^

C:\Users\Marco\Documents\Arduino\libraries\Time-master\DateStrings.cpp: In function ‘char* dayStr(uint8_t)’:

C:\Users\Marco\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta1/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:76:81: error: ‘const void*’ is not a pointer-to-object type

 #define pgm_read_ptr(addr)              (*reinterpret_cast<const void*>(addr))

                                                                             ^

C:\Users\Marco\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.0-beta1/tools/sdk/libc/xtensa-lx106-elf/include/sys/string.h:32:57: note: in definition of macro ‘strcpy_P’

#define strcpy_P(dest, src) strncpy_P((dest), (src), SIZE_IRRELEVANT)

                                                     ^

C:\Users\Marco\Documents\Arduino\libraries\Time-master\DateStrings.cpp:86:28: note: in expansion of macro ‘pgm_read_ptr’

strcpy_P(buffer, (PGM_P)pgm_read_ptr(&(dayNames_P[day])));

                        ^

Multiple libraries were found for “BlynkSimpleEsp8266.h”
Used: C:\Users\Marco\Documents\Arduino\libraries\blynk-library-0.6.1
Not used: C:\Users\Marco\Documents\Arduino\libraries\blynk-library-0.4.3
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

By the way, at the moment I’m getting time from a German NTP server through a really easy to use library I found online. So Time.h and SimpleTimer.h should be working.
The problem with that is that sometimes the time is stuck at 7:28, which is why I wanted to use the RTC widget integrated in the app anyways.

Thanks in advance for any help.

This is quite an old version of the ESP core. The latest version is 2.7.1 so the first thing I’d do is to update the ESP core and try recompiling.

Pete.

Well, I just updated my ESP core and now, although compiling still takes more time than usual, it seems to work! Thank you so much, I had already forgotten that you have to have the ESP core.

1 Like