0 votes
in Touch Interface by (180 points)

I purchased the Thingpulse kit and have followed all the instructions, but am getting this compile error on configTime().  I am using the Arduino Web Editor, so the answers for similar issues on this forum don't work for me.  What should I do?

/usr/local/bin/arduino-cli compile --fqbn esp8266:esp8266:d1_mini:baud=921600,dbg=Disabled,eesz=4M,exception=disabled,ip=lm2f,lvl=None____,vt=flash,wipe=none,xtal=80 --libraries /home/builder/opt/libraries/latest --build-cache-path /tmp --output-dir /tmp/261904083/build --build-path /tmp/arduino-build-6B787F3A66063A1D134C21D4DCD1AD4B --library /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/ESP8266 Weather Station --library /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/IRremote --library /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/Json Streaming Parser --library /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/MD_MAX72XX --library /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/MD_Parola --library /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/Mini Grafx --library /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/SoftSPI --library /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/TimerOne --library /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/XPT2046_Touchscreen /tmp/261904083/esp8266-weather-station-color

Using library Json Streaming Parser at version 1.0.5 in folder: /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/Json Streaming Parser
Using library Mini Grafx at version 1.2.6 in folder: /mnt/create-efs/webide/06/b8/06b8c24b83c07c14c4637374bb8a6226:sroakton/libraries_v2/Mini Grafx
/tmp/261904083/esp8266-weather-station-color/esp8266-weather-station-color.ino: In function 'void initTime()':
/tmp/261904083/esp8266-weather-station-color/esp8266-weather-station-color.ino:165:29: error: invalid conversion from 'const char*' to 'long int' [-fpermissive]
configTime(TIMEZONE.c_str(), NTP_SERVERS);
^
/tmp/261904083/esp8266-weather-station-color/esp8266-weather-station-color.ino:165:43: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
configTime(TIMEZONE.c_str(), NTP_SERVERS);
^
/tmp/261904083/esp8266-weather-station-color/esp8266-weather-station-color.ino:165:43: error: too few arguments to function 'void configTime(long int, int, const char*, const char*, const char*)'
In file included from /tmp/261904083/esp8266-weather-station-color/settings.h:25:0,
from /tmp/261904083/esp8266-weather-station-color/esp8266-weather-station-color.ino:28:
/home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/cores/esp8266/Arduino.h:297:17: note: declared here
extern "C" void configTime(long timezone, int daylightOffset_sec,
^
Error during build: exit status 1

1 Answer

+1 vote
by (19.9k points)
selected by
 
Best answer

"have followed all the instructions" - except for the IDE part? Sorry but I have no experience with the Web Editor. I can confirm though that the code compiles just fine in the (offline) Arduino IDE using ESP8266 Arduino Core 3.0.2; the latest release.

That being said, it might have something to do with the version of ESP8266 Arduino Core the Web Editor uses. Can you change it (equivalent to the Boards Manager)? configTime() used in 3.0.2 was last changed some three years ago: https://github.com/esp8266/Arduino/blame/3.0.2/cores/esp8266/Arduino.h#L269-L280. However, I see that they modified it in the unreleased master branch recently: https://github.com/esp8266/Arduino/pull/8606/files. Maybe the Web Editor uses the tip of master by default?

by (180 points)
I had hoped to continue using the Arduino Web Editor, but no go.  After downloading and installing the Arduino IDE locally, it did compile successfully.  Thank you.

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

https://thingpulse.com

...