0 votes
in Touch Interface by (170 points)
Fairly experienced Adruino hacker here, which probably accounts for my issue.  I've screwed up versions and I can't compile Weatherstation Color.  Following a recent note that the touch screen code hasn't caught up with Arduino code, I have loaded esp8266 V2.4.2.  Everything else was loaded per instructions (I think).  When I compile, I get an error:

Arduino: 1.8.16 (Mac OS X), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, 4M (3M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_860617/esp8266-weather-station-color.ino: In function 'void initTime()':
esp8266-weather-station-color:161:29: error: invalid conversion from 'const char*' to 'long int' [-fpermissive]
   configTime(TIMEZONE.c_str(), NTP_SERVERS);
                             ^
esp8266-weather-station-color:161:43: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   configTime(TIMEZONE.c_str(), NTP_SERVERS);
                                           ^
esp8266-weather-station-color:161:43: error: too few arguments to function 'void configTime(long int, int, const char*, const char*, const char*)'
In file included from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_860617/settings.h:24:0,
                 from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_860617/esp8266-weather-station-color.ino:27:
/Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/Arduino.h:295:17: note: declared here
 extern "C" void configTime(long timezone, int daylightOffset_sec,
                 ^
exit status 1
invalid conversion from 'const char*' to 'long int' [-fpermissive]

Looking into it, it appears older versions needed a different invocation of configTime that had a dst offset between a timezone and the time servers.  configTime is defined in sntp which is in the esp8266 codebase.  

What have I done wrong?

1 Answer

0 votes
by (19.9k points)
selected by
 
Best answer

I'm brave enough to post this as an answer (rather than as a comment) even though I didn't personally validate if I'm right here.

ESP8266 Arduino Core 2.4.2 is fairly "old" IIRC. I'm not sure we ever verified our app against the current 3.x releases but I suggest you try with latest pre-v3. Currently this is 2.7.4.

a recent note that the touch screen code hasn't caught up with Arduino code

This refers to the touch library, right? Our docs only state that it should be >=1.4: https://docs.thingpulse.com/guides/wifi-color-display-kit/#install-libraries.

by (170 points)
That helped.  I see why I thought going back that far was right (your directions show 2.4.1, although the text doesn't say to use that version).  I'm past that, but now two other issues, SPIFFS deprecated and some weird issue with MetOfficeClient:
Arduino: 1.8.16 (Mac OS X), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp: In member function 'bool TouchControllerWS::loadCalibration()':
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp:9:17: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
    9 |   bool result = SPIFFS.begin();
      |                 ^~~~~~
In file included from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.h:1,
                 from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp:1:
/Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/FS.h:275:15: note: declared here
  275 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
      |               ^~~~~~
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp:14:12: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
   14 |   File f = SPIFFS.open("/calibration.txt", "r");
      |            ^~~~~~
In file included from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.h:1,
                 from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp:1:
/Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/FS.h:275:15: note: declared here
  275 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
      |               ^~~~~~
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp: In member function 'bool TouchControllerWS::saveCalibration()':
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp:37:17: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
   37 |   bool result = SPIFFS.begin();
      |                 ^~~~~~
In file included from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.h:1,
                 from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp:1:
/Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/FS.h:275:15: note: declared here
  275 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
      |               ^~~~~~
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp:40:12: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
   40 |   File f = SPIFFS.open("/calibration.txt", "w");
      |            ^~~~~~
In file included from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.h:1,
                 from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/TouchControllerWS.cpp:1:
/Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/FS.h:275:15: note: declared here
  275 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
      |               ^~~~~~
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino: In function 'void setup()':
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino:199:22: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
  199 |   bool isFSMounted = SPIFFS.begin();
      |                      ^~~~~~
In file included from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/CertStoreBearSSL.h:26,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h:30,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiClientSecure.h:23,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiServerSecure.h:20,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/ESP8266WiFi.h:41,
                 from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino:32:
/Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/FS.h:275:15: note: declared here
  275 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
      |               ^~~~~~
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino:203:5: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
  203 |     SPIFFS.format();
      |     ^~~~~~
In file included from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/CertStoreBearSSL.h:26,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h:30,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiClientSecure.h:23,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiServerSecure.h:20,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/ESP8266WiFi.h:41,
                 from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino:32:
/Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/FS.h:275:15: note: declared here
  275 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
      |               ^~~~~~
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino: In function 'void loadPropertiesFromSpiffs()':
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino:660:7: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
  660 |   if (SPIFFS.begin()) {
      |       ^~~~~~
In file included from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/CertStoreBearSSL.h:26,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h:30,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiClientSecure.h:23,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiServerSecure.h:20,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/ESP8266WiFi.h:41,
                 from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino:32:
/Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/FS.h:275:15: note: declared here
  275 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
      |               ^~~~~~
/var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino:663:14: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
  663 |     File f = SPIFFS.open("/application.properties", "r");
      |              ^~~~~~
In file included from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/CertStoreBearSSL.h:26,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h:30,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiClientSecure.h:23,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/WiFiServerSecure.h:20,
                 from /Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src/ESP8266WiFi.h:41,
                 from /var/folders/_3/_nxn68057939dlb4s5181qn00000gn/T/arduino_modified_sketch_445981/esp8266-weather-station-color.ino:32:
/Users/brosen/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/FS.h:275:15: note: declared here
  275 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
      |               ^~~~~~
/Users/brosen/Documents/Arduino/libraries/ESP8266_Weather_Station/src/MetOfficeClient.cpp: In member function 'String MetOfficeClient::getWeatherIconName(String)':
/Users/brosen/Documents/Arduino/libraries/ESP8266_Weather_Station/src/MetOfficeClient.cpp:463:1: error: control reaches end of non-void function [-Werror=return-type]
  463 | }
      | ^
cc1plus: some warnings being treated as errors
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
by (19.9k points)
I know, the screen shot in the docs shows 2.4.1 but we can't constantly update those screen shots.

Yep, SPIFFS is deprecated. Since the whole world depends on it it'll likely take quite a while until they can actually remove it.

That thing about the MetOfficeClient was fixed in our WeatherStation library some months ago https://github.com/ThingPulse/esp8266-weather-station/pull/199. However, it appears we didn't release the fix yet.

Is that `-Werror=return-type` compile flag something you set explicitly in the Arduino IDE or does this come from the platform?
by (170 points)
Compiled!  Thanks for the help.  Looks like it might be easy to fix SPIFFS: https://www.esp8266.com/viewtopic.php?f=6&t=21801
I may try that after I get some other stuff working.  If it seems to work, I'll submit a PR.  I'm not sure how I got that compile flag.  It may be something we did when debugging some code on another platform.
by (170 points)
A follow up.  It's working!  I don't have a forecast, but everything else appears to work.  I am running on an up to date Macbook, and I really needed to run a 3.0.x version of the 8266 code.  To do that, I had to fix every instance of httpClient.begin(url) to WiFiClient wifiClient; httpClient(wifiClient,url).  The trivial fix to SPIFFS didn't work,  there must be more than one instance of including SPIFFS.h  I will work on that later.  For now, I'm ignoring the warnings. This really is a VERY nice package, and I'm very impressed with it.

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.

https://thingpulse.com

...