Is it possible to have subfolders in the library folder?

I'm using IDE 2.0 RC5

I would like to be able to collect some like library files in a subfolder in the Library. Is this possible?

I've tried:

#include
#include <subfolder/DS3232RTC>
#include "subfolder/DS3232RTC"

all the above result in a fatal error " No such file or directory"

Thanks

https://arduino.github.io/arduino-cli/0.21/library-specification/#layout-of-folders-and-files

Tut tut. 3.7k posts and you still aren't using code blocks?

Only the files in the root of the source code folder of the library are used by the Arduino build system's library discovery process. Discovered libraries are added to the compiler's include search path, so after an #include for a file in the root of the source code folder, you can then add #include directives for files in subfolders.

For example. If I have this library:

<sketchbook folder>/
└── libraries/
    └── FooLib/
        ├── library.properties
        └── src/
            ├── FooLib.h
            └── subfolder/
                └── Bar.h

I can't do this:

#include <subfolder/Bar.h>

But I can do this:

#include <FooLib.h>
#include <subfolder/Bar.h>

There is a feature request to expand the scope of the discovery process:

And maybe somewhat related is this request for the possibility of organizing libraries into subfolders instead of all of them having to be in the root of the libraries folder:

thank you :slight_smile:

Tut tut. 3.7k posts and you still aren't using code blocks?

Yea I know :woozy_face: Although when I posted it I wasn't thinking of it as code, only lines of "code"? :slightly_smiling_face:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.