When I add Arduino's own library to two projects, one of them successfully compiling, one of them not. What the reason is? I can't figure out.
Keypad.h:6:27: fatal error: OnewireKeypad.h: No such file or directory
#include <OnewireKeypad.h>
^
compilation terminated.
Error compiling.
Most likely:
You need to include any library you use in your sketch (even if it is used in another file also). This is so the IDE can copy it to the temp directory. So you'll need
#include <OnewireKeypad.h>
in yourKeypad.h
and sketch file.Something else to try:
Keypad is the name of a library (uses
Keypad.h
). If you have it installed, you may be grabbing this instead of your local sketch file.Try renaming the file to something else like
OWKeypad.h
. Or you could try including it with quotes instead of angle brackets:include "file.h"
instead of#include <file.h>
.