Another include path problems

I’ve tried doing my homework by reading relevant documentation Redirecting...
and reading many other posts where people struggling with include paths for their external libraries. Clearly Im not doing something correctly. After desperately trying to use existing libraries from the Arduino IDE, i tried adding libs using library manager. Still no joy.

[env]
platform = espressif32
framework = espidf
monitor_speed = 115200
[env:featheresp32-s2]
board = featheresp32-s2
lib_deps = 
    knolleary/PubSubClient@^2.8
    adafruit/Adafruit NeoPixel@^1.8.5
    arduino-libraries/WiFi@^1.2.7

Still in the code it says it cannot find it.

image

What am I doing wrong?

The included header files are for the Arduino framework, yet you have specified ESP-IDF.

Either change the framework to arduino, or search for other libraries that work with ESP-IDF.

In either case, try to build the project first. As long as the project isn’t built, the libraries haven’t been downloaded and the red squiggly lines are just misleading.

Manuel,

Thank you very much for your answer and I apologize for delay in my response. I am confused about the framework because before I used PlatformIO and VSCode, I was building the same code in Arduino IDE.

The hardware is ESP32S2 but of course the libraries came from Arduino. Can I use them?

p.s. Yes I tried to just running the build and it get fatal error: WiFi.h: No such file or directory

I just realized that you are using an ESP32-S2 board and that the Arduino version for it still hasn’t reached final state. It should still be possible to get it working with PlatformIO but it might take quite some fiddling with the platformio.ini file.

Search for “ESP32S2” in this forum and you will find related threads. But for the moment it might indeed be easier to use the Arduino IDE. There is a description on GitHub - espressif/arduino-esp32: Arduino core for the ESP32 on how to get the prerelease version installed.