I am just new in using Atom after having used Arduino IDE since years. My computers are using Windows 10.
From Arduino i imported a project for ESP32/ESP8266 with a testprogram for customizing parameters in a configfile in SPIFFS. The wifimanager is included in the main program.
The program which was compiling in Arduino IDE without problems does not compile in Atom.
Error message:
C:/Users/xxxx/.platformio/lib/WifiManager_ID567/WiFiManager.h:16:25: fatal error: ESP8266WiFi.h: No such file or directory
In Arduino i could define a compiler switch called ‘ESP8266’ which lets the compiler either use just one of the libraries WIFI.h or ESP8266wifi.h.
In the library registry i could not fin ESP8266WiFi
Now my question: How can i get the ESPWiFi.h/.cpp to the correct directory?
Sounds like lib_ldf_mode = deep+ (or chain+) is needed for the library dependency finder (LDF) to be able to include the correct library. See documentation.
You don’t need to install ESP8266WiFi via the registry, it’s bundled with the ESP8266 core.
If you’re switching between Wifi.h and ESP8266WiFi.h using a define, then as maxgerhardt pointed out, you’ll probaly need to use one of the + variants of the ldf mode.
The two problems you’re likely to encounter next if you’re not familar with PlatformIO, or more correctly, proper C++, is the need to add #include <Arduino.h to the top of your main source file if you don’t have it already, and the need to forward declare functions before use…
Are you using the development version of WifiManager? As the standard release version does not have ESP32 support (which is why it’s trying to include the ESP8266 WiFi library…
You can use the development version by changing the lib_deps line in your platformio.ini to lib_deps = https://github.com/tzapu/WiFiManager#development
thank you for your help - and please excuse my late reaction!
In the meantime i used the wifimanager to develop my own branch. I am almost fininished - no fatal errors anymorde and less memory consuming. Only the custom parameter transfer has to be finished.
If somebody wants i could share my new code. But i am still not familiar with github…