Hello in my arduino code i simple want to include another file like this:
#include "letters.h"
but it says
error: letters.h: No such file or directory
the letters.h is definitely there, right next to the ino file from which i compile.
You don't need to include, just call functions from another file. It handles for you.
This link talks about how to do it:
http://arduino.cc/en/Guide/Libraries
For me, it was as simple as finding this menu in the editor:
Sketch -> Import Library -> Add Library
Try #include <letters.h>
with <
and >
instead of double quotes.
The C++ standard says #include "header"
searches the header in the same folder as the .cpp and then in the include paths, while #include <header>
only searches the include paths. But the Arduino "language" is not 100% C standards compliant.
If it still doesn't work, it would mean you don't have letters.h
in your libraries folder. Either add it there or copy it to your sketch folder (together with all other source files in that library), restart (all instances of) the Arduino IDE and #include "letters.h"
(with the double quotes) so it is included from your sketch folder.