Hi
I’ve pasted code into this development environment that worked perfectly ok in the Arduino IDE with no compiler warnings or runtime issues.
It relates to using the built-in ESP8266 NTP library.
I’ve looked online and can see pretty much the same issue elsewhere but there was no solution -
https://community.platformio.org/t/issue-with-esp-idf-time-h/6986
This could also be related -
https://community.platformio.org/t/time-not-declared-in-platformio-but-works-in-arduino-ide/9417
I get an IntelliSense warning (‘identifier “setenv” is undefinedC/C++(20)’) for this line of code -
setenv("TZ", "GMT+0BST-1,M3.5.0/01:00:00,M10.5.0/02:00:00", 1);
Here’s the start of my code -
#include <Arduino.h>
#include "Wire.h"
#include "RTClib.h"
#include <ESP8266WiFi.h>
#include <time.h>
Here’s my platformio.ini file -
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps =
RTClib
lib_ignore = TinyWireM
I’ve read that this could be related to the fact that there are other time libraries and that I could be using the wrong one, meaning that setenv isn’t declared. However, the code does look like it may be workin ok.
Please would someone be able to suggest how I can get IntelliSense to deal with the code properly ?
Thanks