Several places in the eBook “Learn ESP32 using Arduino IDE”, the instructions are to download a zip file that is for a needed library, unzip it, remove the -master, and move it to “your Arduino IDE installation libraries folder”. I have 4 places on my windows pc where libraries are stored for this Arduino IDE: 1) C: /Program Files(x86)/Arduino/libraries, 2) C:/Users/xxxx/Documents/Arduino/libraries, and 3) C:/Users/xxxx/AppData/Local/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries and 4) the “Sketchbook directory” chosen in /File/Preferences
I can see that adding new libraries e.g. the Adafruit_BME280 library, gets put into the “Sketchbook directory”. If I change where I’m doing “sketches” (e.g a very different project folder with multiple designs in it), and of course I change the “Sketchbook directory” to accommodate that new project directory, those new installed libraries won’t be found. I guess one needs to keep the “Sketchbook directory” very general (which becomes a hassle since you have to search for where you’re putting sketches, etc)
Finally, I noticed that the the WiFi library (containing wifi.h) is located in 2 of those 4 places listed above, AND the wifi.h files in each of them is different !!! … this IDE is frustrating). Thanks for any help.
Hi,
I suggest working with arduino ide from windows store :
https://apps.microsoft.com/store/detail/arduino-ide/9NBLGGH4RSD8?hl=fr-fr&gl=FR
Regards
Pascal
Thanks Pascal, but I’m not clear how that would help. I think the basic issue is the design of the IDE – it should have 1 place for all libraries, which are independent of where one’s sketchbook is specified. There are many good things about the IDE, but lots that aren’t and library structure is one.
The solution to my issue is to copy the entire contents of the /Sketchbook Directory / libraries folder over to a new Sketchbook Directory when it is changed. All the libraries that are added in the eBook “Learning ESP32 using Arduino IDE” are eventually located there – all 16 of them … so just make a copy and put it in the new Sketchbook directory.
This question can be closed Sara. Thank you.
Hi Joe.
You can also add libraries by going to Sketch > Include Library> Add .ZIP library and select the ZIP file for the downloaded library.
All libraries that you add by this method will be located on the same place.
At the moment, removing the “-master” isn’t necessary. In older versions of the IDE that was necessary because it caused some issues. At the moment, it will work just fine like that.
I hope this helps.
Regards,
Sara
Hi Joe,
You are right, the ide library structure of arduino ide is not the best !
That why I try arduino ide “portable” but again I have an issue using <ESPAsyncWebServer.h> in the portable version.
(nevertheless it could be a good solution for other projects)
Here is my question in arduino forum and this one about arduino portable:
https://rntlab.com/question/issue-with-arduino-ide-portable-and-esp-32-include-espasyncwebserver-h/
And it seems that is not so easy.
Have fun with your projects !