logo elektroda
logo elektroda
X
logo elektroda

Compile error for weather station on ESP8266 - Timezone-master library, Arduino 1.8.13

pier 1506 18
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18904562
    pier
    Level 24  
    Hello.
    I wanted to run a meteo station on an ESP8266.
    During compilation it threw a long error. I am unable to deal with it. I have the libraries all, the boards updated and I can't compile.
    And here is the error:
    Code: C / C++
    Log in, to see the code
    .

    Please help.
  • ADVERTISEMENT
  • #2 18904817
    JacekCz
    Level 42  
    Note: the Timezone-master library runs on avr architecture(s) and may not be compatible with the current board which runs on esp8266 architecture(s).
    .

    Is there something unreadable about this?
    You have acquired the wrong library.

    And:

    Found multiple libraries in "SD.h" .

    I will leave aside my mischievous view, about the quality of most of the so-called "libraries" of the arduino.
  • ADVERTISEMENT
  • #3 18905340
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #4 18905342
    pier
    Level 24  
    JacekCz wrote:
    Note: the Timezone-master library runs on avr architecture(s) and may not be compatible with the current board which runs on esp8266 architecture(s).
    .

    Is there something unreadable about this?
    You have acquired the wrong library.

    And:

    Found multiple libraries in "SD.h" .

    I will leave aside my mischievous view, about the quality of most of the so-called "libraries" of the arduino.


    I have tried various Timezone libraries and always the same errors. I have already used this library several times with ESP and no problem.

    As for the SD.h library, I don't know what the issue is. I can't delete any of them because it throws new errors.
  • #5 18905356
    Anonymous
    Level 1  
  • #6 18905405
    pier
    Level 24  
    khoam wrote:
    pier wrote:
    I have already tried various Timezone libraries and always the same errors. I've already used this library several times with ESP and there was no problem.
    As for the SD.h library, I don't know what the issue is. I can't remove any of them because it throws new errors.
    .
    In post #3 the versions of the libraries are listed . The SD library, on the other hand, has been "system" for some time and does not need to be installed additionally - hence the errors about two different SD libraries.

    Added after 6 [minutes]:

    Although the Timezone library is only labelled "avr", OpenWeather only uses the part of it that is independent of the MCU type.


    I don't know what the SD.h is about but I didn't install anything extra. As you can see from the error description one is in the Arduino folder and the other one I don't know like with the ESP board.
    Which one to remove and which one to leave?
  • #7 18905481
    Anonymous
    Level 1  
  • #8 18905498
    pier
    Level 24  
    khoam wrote:
    The one that should remain is the one that is in Arduino Core for ESP8266. However, I don't think this is the cause of the problems in this case - the Arduino IDE selects the version of the library that is in Arduino Core first anyway.
    .
    I have removed the library from the Arduino folder. Still a bunch of errors. What else to cling to?
  • #9 18905505
    Anonymous
    Level 1  
  • #10 18905510
    pier
    Level 24  
    khoam wrote:
    What version of the TFT_eSPI library do you have installed?
    .
    2.2.14
  • #11 18905512
    Anonymous
    Level 1  
  • #12 18905516
    pier
    Level 24  
    khoam wrote:
    Update maybe to version 2.2.19 (the latest) - I compiled the example with this version.
    .
    In the list I have the highest version 2.2.14
  • #13 18905520
    Anonymous
    Level 1  
  • #14 18905526
    pier
    Level 24  
    khoam wrote:
    Uninstall version 2.2.14 download the ZIP package from https://github.com/Bodmer/TFT_eSPI - the library can also be installed from a ZIP file.
    .
    Well that's what I'm doing and still errors.
  • ADVERTISEMENT
  • #15 18905541
    Anonymous
    Level 1  
  • #16 18905546
    pier
    Level 24  
    khoam wrote:
    Same exact errors, or different?
    What is the content of your library.properties file in the TFT_eSPI library? In mine it is:
    Code: Ini
    Log in, to see the code
    .
    Libraries installed from ZIP, are not updated later by Arduino IDE. This has to be done "manually".
    .

    This is exactly what I have.

    Added after 8 [hours] 59 [minutes]: .

    Khoam I may have a stupid idea but I don't know what to do anymore.
    Maybe I uninstall the whole Arduino with libraries and install from scratch? Might that help?
  • #17 18906428
    Anonymous
    Level 1  
  • #18 18906724
    pier
    Level 24  
    khoam wrote:
    pier wrote:
    Maybe I uninstall the whole Arduino with libraries and reinstall from scratch? Might help?
    .
    It certainly won't do any harm. The TFT_eSPI, JPEGDecoder, JSON_Decoder libraries are probably better downloaded directly from the master on github. I did that myself and the compilation went without problems.
    .

    I did as written. The program compiled, uploaded and poof again. It does not display any icon.
    On the serial port, it is sending messages that it has not found fonts and icons.
    In the folder with the program is the data with all the fonts and icons, where do I put this to make it work?

Topic summary

✨ The discussion revolves around a compilation error encountered while attempting to run a weather station project on an ESP8266 using the Arduino IDE (version 1.8.13). The user reports issues with the Timezone-master library, which is incompatible with the ESP8266 architecture, leading to compilation failures. Various responses suggest checking library versions, specifically recommending an update to the TFT_eSPI library to version 2.2.19. The user also faces conflicts with multiple SD.h libraries and is advised to retain the version included with the ESP8266 core. After reinstalling libraries and the Arduino IDE, the user still experiences issues with missing fonts and icons during runtime, prompting further guidance on using SPIFFS for file management.

FAQ

TL;DR: 49% flash and 41% RAM used; "there is no problem with the OpenWeather library itself." Fix ESP8266 OpenWeather compile errors by updating TFT_eSPI, removing SD duplicates, and uploading SPIFFS assets. This FAQ is for makers on Arduino 1.8.13 asking how to fix TFT_eSPI/Timezone/SD issues. [Elektroda, khoam, post #18905340]

Why it matters: It helps ESP8266 developers resolve compile-time errors and missing display assets fast, with known-good versions and steps.

Quick Facts

How do I fix “invalid conversion from uint32_t to const void*” when compiling OpenWeather on ESP8266?

Update the TFT_eSPI library to version 2.2.19. Uninstall 2.2.14 from the Library Manager. Then install the latest ZIP from GitHub and rebuild. This resolves the pgmspace pointer conversion errors in drawChar. Ensure only one TFT_eSPI copy remains in your libraries path before compiling. [Elektroda, khoam, post #18905512]

Does the "Timezone-master runs on avr" warning break ESP8266 builds?

No. OpenWeather uses parts of Timezone that are MCU‑independent. Timezone 1.2.4 works fine with ESP8266 in this project. You can ignore the architecture warning for this sketch. Keep Timezone at 1.2.4 alongside Time 1.6 for compatibility. [Elektroda, khoam, post #18905356]

I see "Found multiple libraries in SD.h". Which one should I use?

Use the SD library bundled with the ESP8266 Core. Remove any extra SD library from your sketchbook/libraries folder. The Arduino IDE prioritizes the Core’s SD first, but duplicates still create noise. Keeping only the Core SD avoids confusion during builds. [Elektroda, khoam, post #18905481]

What library versions are known to compile the TFT_eSPI_OpenWeather example?

Working set: TFT_eSPI 2.2.19, JPEGDecoder 1.8.0, SD 2.0.0, SDFS 0.1.0, ESP8266SdFat 1.1.0, ESP8266WiFi 1.0, JSON_Decoder 0.0.7, OpenWeather 0.1.5, Time 1.6, and Timezone 1.2.4. This set successfully built on ESP8266 core 2.7.4 with Arduino 1.8.13. [Elektroda, khoam, post #18905340]

How do I upload fonts and icons so the display shows correctly?

Assets live in the sketch’s /data folder and must go to SPIFFS. 1) Set SPIFFS size to ≥1.5 MB in Tools. 2) Install the ESP8266FS plugin. 3) Use Tools → ESP8266 Sketch Data Upload to push /data to SPIFFS. Reboot and run the sketch. [Elektroda, khoam, post #18907018]

Is reinstalling Arduino IDE and libraries a valid fix for persistent compile errors?

Yes. A clean reinstall and fresh library downloads from GitHub master resolved the build and upload. "It certainly won't do any harm." This approach clears conflicting duplicates and stale caches. After reinstall, compile and upload completed successfully. [Elektroda, khoam, post #18906428]

Which ESP8266 Core version should I target for this project?

Use ESP8266 core 2.7.4. The successful build environment referenced this core version throughout the compilation log. Align your Board Manager version to 2.7.4 for consistent results. [Elektroda, khoam, post #18905340]

Why does my serial log say fonts or icons were not found?

The sketch loads these assets from SPIFFS, not from the SD card or sketch folder. If you did not upload /data to SPIFFS, the files won't be found. Upload them using the ESP8266 Sketch Data Upload tool after setting SPIFFS size. [Elektroda, khoam, post #18907018]

What SPIFFS size should I choose to avoid crashes?

Set SPIFFS to at least 1.5 MB. The example’s settings call this out as important to prevent crashes. Select the larger SPIFFS option under Tools before uploading your data partition. [Elektroda, khoam, post #18907018]

How can I verify TFT_eSPI actually updated to the right version?

Open TFT_eSPI/library.properties and confirm version=2.2.19. Note that ZIP-installed libraries are not auto‑updated by the IDE. You must update them manually when new releases drop. This prevents being stuck on outdated code. [Elektroda, khoam, post #18905541]

Do I need to install the SD library separately on ESP8266?

No. The SD library ships with the ESP8266 Core and does not require separate installation. Extra SD copies create duplicate warnings and may cause confusion. Remove any additional SD library from your user libraries folder. [Elektroda, khoam, post #18905356]

How much memory does TFT_eSPI_OpenWeather use on a NodeMCU 1.0?

The successful build used 518,652 bytes of flash (49% of 1,044,464) and 34,336 bytes of RAM (41%). That left about 47,584 bytes for local variables. These figures help judge headroom for customizations. [Elektroda, khoam, post #18905340]

I updated TFT_eSPI but still get errors. What should I try next?

Purge duplicate libraries from your sketchbook/libraries folder. Reinstall libraries directly from their GitHub master branches. If issues persist, reinstall the Arduino IDE and ESP8266 Core cleanly. This approach resolved the thread’s compilation issues. [Elektroda, khoam, post #18906428]

Where can I get compatible helper libraries (JPEGDecoder, JSON_Decoder, OpenWeather)?

Use Bodmer’s GitHub repositories for current masters. Confirm versions that built successfully: JSON_Decoder 0.0.7 and OpenWeather 0.1.5, plus JPEGDecoder 1.8.0. Install via ZIP and keep them updated manually. [Elektroda, khoam, post #18905340]

I don’t see “ESP8266 Sketch Data Upload” in Tools. How do I enable it?

Install the ESP8266FS (Arduino-ESP8266FS-Plugin). Restart the IDE to reveal the Tools menu item. Then use it to upload the /data folder to SPIFFS with your chosen partition size. [Elektroda, khoam, post #18907018]
ADVERTISEMENT