Extra Arduino library integration


I wanted to add a Debounce library to my project. After successful installation via PIO’s library interface and the include in the usermod.cpp

#include <ezButton.h>

the Build process failed :slightly_frowning_face:

So I looked up where the extra libraries are installed and it’s inside this path “WLED-master.pio\libdeps\d1_mini\ezButton” in my case.

ezButton also appears several times int the platformio.ini

board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
upload_speed = 921600
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
lib_deps =
monitor_filters = esp8266_exception_decoder

So can anyone point out to me what I do have to change/add to get the libraries to be found?

Thanks in advance!

Buttons are already debounced.

That’s good to know, but doesn’t address the general question about why the new library isn’t known to the compiler.

You included like this:
#include <ezButton.h>
or like this:
#include "ezButton.h"?
It should be like first one, but compiler says you did with double quotes, if I’m not wrong.

Yes, during posting, I mixed it up.
I tried it first with <> and after with “”, which both don’t work.

Then i’m not sure what’s wrong. You could put library files directly to wled00 folder and then include .h file with quotes in usermod.cpp, it should work.

That was also what I thought, but I want to understand how to make the project to recognize these additional libraries :upside_down_face:

Hey Huggy,
I don’t really understand what you want to point out. What do you mean with “easy path”? I already use PIO.

What “bending to my will” are you talking about? No one talked about arduino IDE.

Sorry that I’m annoyed, but I already mentioned this in my initial post:

The library is installed in this folder: \\WLED-master.pio\libdeps\d1_mini\ezButton\src, but the compiler apparently doesn’t know its existence.

1 Like

Hopefully you are no longer annoyed I missed that juicy nugget.

Same here. I used ezButton in other projects with platform.io successfully. But WLED will not work. Did you solved the problem?

Hi, no not yet, I didn’t have time yet, to dig into the problem. Also I got no luck asking the members on Discord :slightly_frowning_face: