I will try to give an answer as it is not easy to understand what you mean.
Probably it is also better if you know how the Arduino IDE works, before try to make complex projects.
Short answer:
Yes, it is possible
Normally, you have an ino-file, some other files and many libraries. If you want create something for your project, you can just create a folder inside the library folder.
But this is not what you want right?
You can create many folders inside your project and include any header inside your folders just with
#include "subfolder/yourfile.h"
The files will not be opened with your Arduino IDE.
You can also create your "mini library", so the compiler will compile it with your project. This library need to be in a subfolder called src
. At this point it will be converted and compiled for your project.
Simple working example:
testsub.ino
#include "src/test.h"
Test *test = new Test();
void setup(){
Serial.print(test->number());
}
void loop(){
}
Create a subfolder src
and place your files:
test.h
class Test
{
public:
Test();
int number();
};
and
test.cpp
#include "test.h"
Test::Test() {
}
int Test::number() {
return 95;
}
If you want another "library", you can create another subfolder called src
.
simple
? Looks like things are simple only for simple deeds. – zhekaus Dec 16 '19 at 10:46#include "subfolder/header.h"
and it works. You can see this big project for example: github.com/xoseperez/espurna/tree/dev/code/espurna - but you will not see the files inside the Arduino IDE. Simple means, that if you don't have programming skills, you are able to open and edit something without loose time to find out what an IDE is and how it works. In future, with the PRO version, it will be easier to develop something... I hope ;) – Adriano Dec 16 '19 at 13:35