Hello,
I try to write a little bit structured code. So I put all the functions belonging to one issue into a class with a *.h and *.cpp File.
When I try to include a non- Standard *.h file from a library into my *.h file of the class, I get a "No such file or directory".
myClass.h:
#ifndef __CL_KEYBOARD_H__
#define __CL_KEYBOARD_H__
#include <arduino.h>
#include <PS2Keyboard.h>
class clKeyboard
{
public:
clKeyboard();
private:
PS2Keyboard keyboard;
};
#endif
clKeyboard.cpp:
#include "clKeyboard.h"
clKeyboard::clKeyboard()
{
}
}
mymain.ino:
#include "clKeyboard.h"
void setup()
{
}
void loop()
{
}
It gets me a:
In file included from clKeyboard.cpp:2:
/clKeyboard.h:5:25: warning: PS2Keyboard.h: No such file or directory
In file included from clKeyboard.cpp:2:
clKeyboard.h:13: error: 'PS2Keyboard' does not name a type
It seems that the system is unable to find the *.h in the library- directory. Is there a system variable for the full pathname I can use for the header file?
When I put the include- statement into the *.ino file the system is able to find it.
This puts some question marks on top of my head.