I am trying the Hello World WS example, page 153 of the V2 book. I have added “lib_deps = ESP Async WebServer” to the ini file. I am getting the following errors in the main.cpp file (the #include for Arduino.h and WiFi.h have no issues):
For: #include <AsyncTCP.h>
I get: #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (D:\IncludeIssues\IncludeIssues\src\main.cpp).C/C++(1696)
cannot open source file “AsyncTCP.h”C/C++(1696)
For: #include <ESPAsyncWebServer.h>
I get: cannot open source file “ESPAsyncWebServer.h”C/C++(1696)
Do you have any suggestions for a fix? VS Studio is something I have no experience with and my google results are telling to go alter things I have no idea about.
I just found this by opening the configuration for the project via PlatformIO. So it has “aware” of the correct library but not finding it?
PlatformIO prompted me to add to the include file and it seems to have got rid of the errors. Current problem is that i have lost the PlatformIO upload button etc from the bottom toolbar…not sure what happened there…
So a restart fixed that so things are moving forward =)
Yes, got there in the end. I think I’m too used to the simple Arduino IDE. VS Studio and PlatformIO take a bit of work to use and when it throws an error there seems to be so much information as to be confusing i.e. the include file had 100s of lines of code. I think I prefer the simplicity of the Arduino IDE. I’ll stick with them for now and hopefully things will settle down.
I must say the most frustrating error I got was when I went to upload using PlatformIO. It gave me an error something like “cannot find PlatformIO upload”. So I pressed upload again and it ran the upload?? So lots of little issues that hopefully will disappear as I use this more.
Last question, is there 5G support for the ESP32?
Well, that was interesting. I started the next project and got the same issues, this time it didn’t offer a self-fix.
So I followed the error-hint to the IntelliSense Configurations and added the following lines for ESP Async Webserver and ESP Async TCP. The errors disappeared and the project is working…phew! =)
D:/ESP32 Web server course/1_2_Hello_World_WS_SPIFFS/1_2_Hello_World_WS_SPIFFS/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src
D:/ESP32 Web server course/1_2_Hello_World_WS_SPIFFS/1_2_Hello_World_WS_SPIFFS/.pio/libdeps/esp32doit-devkit-v1/AsyncTCP/src
Meanwhile, if you need any help, just ask.
Regarding the 5G question, I think this discussion answers your question: https://www.reddit.com/r/esp32/comments/lcbmgx/why_do_esp_chips_not_support_5ghz_wifi/.
interesting again with this path issue.
I just copied in the code for the “2.1 Web Server project with a on/off buttons”. I’m getting better with my VS Code environment, so opened a new window, then used PlatformIO to open a new project. Copied in the code for the project…
yes, these days it is not about programming the ESP32 it is about getting things to run under PlatformIO, lol…once I get that sorted/consistent I’ll go back and do the original job and workout what the ESP32 code is actually doing =)
Anyway, so as soon as I copy in the code to main.cpp, up come the same 3 errors. So I came back here, copied the 2 lines above, put in the new path into intellisense and errors-be-gone! =)
I’m still thinking this all has to do with C: vs D: drive and the original install. But it seems to be the permanent fix, hopefully this will save someone a bit of frustration!
So on with the projects =) you guys have done some cool things that I look forward to replicating and learning from =)