I have a file being created using another program, instead of me copying the file to the sketch folder everytime there is an update to the file, I would like to instead include that file that is in another folder in the sketch.
Right - clicking the file shows me the path
C\My_Projects\scrambler\scrambler.h
and when i try to include it
#include "C/My_Projects/scrambler/scrambler.h"
i get an error saying
fatal error: C/My_Projects/scrambler/scrambler.h: No such file or directory
Something to note is that the behavior of the Arduino build system is different for this type of #include directive than for the ones without a path.
When you do something like:
#include <Servo.h>
In addition to the Servo.h file being #included into your sketch file (essentially the equivalent of the #include directive being replaced by the contents of the file), the source files of the Servo library are compiled.
But in this case:
#include "C:/My_Projects/scrambler/scrambler.h"
It is only an include of scrambler.h and nothing more. Any source files under C:/My_Projects/scrambler will not be compiled.
That is probably no problem for your specific application, but I have seen others be confused when they expected it to work just like any normal library installation so I thought I would mention it for the benefit of future readers of this thread.