Best way to run examples of a local installed library?

Using the library manager I’ve installed successfully some libraries. I’ve link them to my main.cpp and that is compiling and uploading fine.

My question is:
In the installed library there are some examples, for example like this one “.pio\libdeps\huzzah\WifiManager_ID567\examples\AutoConnect\AutoConnect.ino”

What is the best/easiest way to compile and upload these examples to my board ?

Duplicate of A way to access Library examples? - #3 by pfeerick

As of now there doesn’t seem to be simple 1-click button to do this, so copy-pasting the example code a file of the same in the src/ folder is the current way to do it. You can file a feature-request in GitHub - platformio/platformio-core: A professional collaborative platform for embedded development though.

Ok thanks for the quick response! Sorry I didn’t find the duplicate before, although I searched the forum …

just wanted to update on this issue. I’ve found another way …

By setting the src_dir value in the [platformio] section in the platform.ini file to the folder where the example is located you can compile and run the example without changing your main.cpp …

1 Like