C:\MyDocuments\ELEGOO The Most Complete Starter Kit for MEGA V1.0.2023.05.05\English\Libraries\Keypad\examples\CustomKeypad\CustomKeypad.ino:10:10: fatal error: Keypad.h: No such file or directory #include <Keypad.h>
^~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: Keypad.h: No such file or directorym
I did install the library, Keypad. The files keypad.h and keypad.cpp show at the top along with CustomKeypad.ino but as you can see in the error message it says that keypad.h doesn't exist.
Using library Keypad at version 3.1.1 in folder: /home/asdfa/Arduino/libraries/Keypad
/home/asdfa/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /tmp/arduino/sketches/DF4586AA0F270E594E4FA475204A2860/CustomKeypad.ino.elf
Sketch uses 3046 bytes (9%) of program storage space. Maximum is 32384 bytes.
Global variables use 333 bytes (16%) of dynamic memory, leaving 1715 bytes for local variables. Maximum is 2048 bytes.
I use Arduino 2.x although it shouldn't matter. If vers 1.x have verbose output, enable it and copy the compiler output here please.
I am using Arduino IDE 2.3.4
C:\MyDocuments\ELEGOO The Most Complete Starter Kit for MEGA V1.0.2023.05.05\English\Libraries\Keypad\examples\CustomKeypad\CustomKeypad.ino:10:10: fatal error: Keypad.h: No such file or directory #include <Keypad.h>
^~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: Keypad.h: No such file or directory
I tried again by extracting the Keypad library into a more basic folder. Can it be on a OneDrive folder?
C:\Users\coene\OneDrive\Documents\Arduino\Keypad\examples\CustomKeypad\CustomKeypad.ino:10:10: fatal error: Keypad.h: No such file or directory #include <Keypad.h>
^~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: Keypad.h: No such file or directory
If you put Keypad.h in another directory, the compiler needs the path AND needs to know the library is now "local" (do not search system paths) by using double-quotes around the filename: #include "Keypad.h"
Try putting Keypad.h in the same folder as the .ino file (again, use double-quotes in the #include line)
[edit]The error might still reference Keypad.cpp... which could be corrected by the same file move, but you will want to find the cause of not seeing the original library in the standard location.
That seems to have eliminated the original error. Now I have another!
C:\Users\coene\AppData\Local\Temp\cc8FMXgA.ltrans0.ltrans.o: In function global constructors keyed to 65535_0_CustomKeypad.ino.cpp.o.1903': <artificial>:(.text.startup+0x8c): undefined reference to Key::Key()'
:(.text.startup+0xa6): undefined reference to `Key::Key()'
collect2.exe: error: ld returned 1 exit status
This indicates (to me) that the path to that one library is broken (libraries have dependencies that are usually "relative" - up one directory, into another directory) and not explicit (c:\dir\dir\here). If you have not, un-install the Keypad library and install it again.
This is not say that the path to all libraries are broken. To verify "the path to all libraries" (but not Keypad) still works, launch another sketch, verify or upload. Look for errors. (probably none).