• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Some libraries questions

Q&A Forum › Category: ESP32 › Some libraries questions
0 Vote Up Vote Down
Enrico asked 1 year ago

Hi,
in several projects of “Build Web Servers ESP32 ESP8266” inside the file platformio.ini it’s used for lib_deps only “ESP Async WebServer”, without to specify the source and the version:

lib_deps = ESP Async WebServer

Compiling the main.cpp I can see that the version used seems to be 1.2.3.

Inside the Visual Studio Code / PlatformIO looking in the libraries tab, I can find several “ESP Async WebServer” libraries. One of them is the one by Hristo Gochkov that has a version 1.2.3. Probably the one used compiling is this, but if I look in the Installation tab they are suggesting to use:

lib_deps = me-no-dev/ESP Async WebServer @ ^1.2.3

1) If this is correct, why are you not using the complete path?
2) Declaring only the library name without source and version, does allow for updating the library?

Beside Hristo’s library there are two other libraries by the ESPhome team. What are these libraries? Looking at the version, these libraries seems not to be the library used at compile time.

Another question is concerning the SPI library, that at a certain moment I found used inside my lib_deps list, but I never remember to have added it explicitly. Was this added as a side effect of other libraries? Do I need it?

The SPI library seems to be a built-in library, also by Hristo Gochkov. Is this the reason that its declared only as this?

lib_deps = SPI @ ^2.0.0

If the fact that no source is given means a built-in library, then also the above declared “ESP Async WebServer” library should be a built-in library, but seems not to be the case.

A few clarifying answers to the libraries would be helping a lot.

Many thanks!

Best regards,
Enrico

Question Tags: ESP32 ESP Async WebServer SPI version
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
Lib_deps only “ESP Async WebServer”, without specifying the source and the version will use the latest stable version.
See the documentation:https://github.com/me-no-dev/ESPAsyncWebServer?tab=readme-ov-file#using-platformio
See bullet number 4:

[env:myboard]
platform = espressif...
board = ...
framework = arduino

# using the latest stable version
lib_deps = ESP Async WebServer

# or using GIT Url (the latest development version)
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

This is the library we’re using: https://github.com/me-no-dev/ESPAsyncWebServer
And on PlaformIO is the one by Hristo Gochkov.

As for the SPI library, it must have been added as a library dependency of other library you used.
Built-in libraries don’t need to be included in the platformio.ini file.

Regards,
Sara

0 Vote Up Vote Down
Enrico answered 1 year ago

Many thanks Sara!
Now many things are clarified.
In this case I‘ll keep this in the platformio.ini file this definition:
lib_deps = ESP Async WebServer
and I‘ll remove the unneeded SPI library.
Best regards,
Enrico

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi again.
 
I just want to let you know, that after writing the eBook (the first version), there were some updates, and the library even though was updated, there was something missing to make VS Code using the latest version. This should have been fixed by the author of the library meanwhile.
 
However, that didn’t happen until now. I’m hoping the that author will fix it someday.
So, currently, I recommend using:

lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

To make sure it uses the latest version.
If you use

lib_deps = ESP Async WebServer

You’ll get an error because it’s using an older version.
 
This issue is addressed on page 188 of the eBook. I recommend taking a look at that.
 
Regards,
Sara
 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.