Hello. I am developing a program for ESP32 device. When I program in Arduino IDE, I just usually create multiple .ino file which then are merged to a single file when I program my devices, my program folder usually looks like:

That works fine, but I am now trying to practise a different library management method where I have a single .ino file (I considered it as a main.c ) and then I am going to create source and header files for different parts of my device. For example for all the wifi code, I will have wifi.c and wifi.h and etc.
I have started a new project and inside a directory, I have created a src folder, where I am going to keep all source and header files:

Now, I want to program LIS3DH accelerometer device and create a seperate source and header files for it. I have use an Arduino adafruit library for that and this library is saved in my arduino default libraries folder (the code also has many dependancies as you can see)

Now, I am struggling to understand what is the best way to use this library in my local project directory?
I have copied all the required files from arduino/libraries and added them to my project /src folder. Now I have many conflicting error libraries:

Do I must delete all the libraries from arduino/libraries folder for that to work or there is another way to overcome this?

That works fine, but I am now trying to practise a different library management method where I have a single .ino file (I considered it as a main.c ) and then I am going to create source and header files for different parts of my device. For example for all the wifi code, I will have wifi.c and wifi.h and etc.
I have started a new project and inside a directory, I have created a src folder, where I am going to keep all source and header files:

Now, I want to program LIS3DH accelerometer device and create a seperate source and header files for it. I have use an Arduino adafruit library for that and this library is saved in my arduino default libraries folder (the code also has many dependancies as you can see)

Now, I am struggling to understand what is the best way to use this library in my local project directory?
I have copied all the required files from arduino/libraries and added them to my project /src folder. Now I have many conflicting error libraries:

Do I must delete all the libraries from arduino/libraries folder for that to work or there is another way to overcome this?
Attachments
-
77 KB Views: 1