Most Complete Starter Kit Problem

I am getting a compile error.

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

How did you install the library and what's the name of it?

Use copy-paste, and put verbose errors in code tags.

You have to install the Arduino keypad library.

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.

Joe

I know it doesn't help you:

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.

UPPER case K

Yes, some libraries have the "same" name, but are different by upper/lower case of one letter. Sorry.

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

You are right, the file names are Keypad.h and Keypad.cpp

Still not working.

One thing I noticed but thought it was nothing: The spaces in the directory
"ELEGOO The Most Complete Starter Kit for MEGA V1.0.2023.05.05"

The more experienced users here can speak out if this is an issue or not, there are mixed info when I google it.

1 Like

Maybe, but I think spaces are good, where special characters are not good.

You have 133 characters in this array of characters (title). Maybe if you shorten it to 126 allowing one for CRLF?

char var[] = {"C:\MyDocuments\ELEGOO The Most Complete Starter Kit for MEGA V1.0.2023.05.05\English\Libraries\Keypad\examples\CustomKeypad\CustomKeypad.ino"};
void setup() {
  Serial.begin(115200); 
  Serial.println(sizeof(var));
}
void loop() {}

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

exit status 1

Compilation error: exit status 1

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).

Perhaps should've uninstall the library first and then fix path, reinstall.

I am going to take a break from it today and maybe continue tomorrow. Thanks for your help so far!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.