# Keypad error

**URL:** <https://forum.arduino.cc/t/keypad-error/124803>\
**Category:** Programming\
**Created:** [October 16, 2012, 12:08am UTC](https://forum.arduino.cc/t/keypad-error/124803 "2012-10-16T00:08:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 16, 2012, 12:08am UTC](https://forum.arduino.cc/t/keypad-error/124803/1 "2012-10-16T00:08:57Z")

</div>

Hi there!

I´m having this error:

In file included from HelloKeypad.cpp:11:  
D:\Arduino\arduino-1.0.1\hardware\arduino\cores\arduino/keypad.h:36:25: error: utility/Key.h: No such file or directory

I downloaded the keypad example and in the Verify process this error appears...

This is the code:

#include \<Key.h\>  
#include \<Keypad.h\>

const byte ROWS = 4; //four rows  
const byte COLS = 3; //three columns  
char keys[ROWS][COLS] = {  
{'1','2','3'},  
{'4','5','6'},  
{'7','8','9'},  
{'\*','0','#'}  
};  
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad  
byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){  
Serial.begin(9600);  
}

void loop(){  
char key = keypad.getKey();

if (key){  
Serial.println(key);  
}  
}

Can anyone help?

---

<div class="post-metadata">

**Author:** ![guix](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/guix/32/215371_2.png) [@guix](https://forum.arduino.cc/u/guix)\
**Post date:** [October 16, 2012, 12:12am UTC](https://forum.arduino.cc/t/keypad-error/124803/2 "2012-10-16T00:12:35Z")

</div>

Hello and welcome,

You must download the keypad library and install it in My documents/Arduino/libraries 🙂

And next time use the code tags (the # button) around your code!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 17, 2012, 10:51pm UTC](https://forum.arduino.cc/t/keypad-error/124803/3 "2012-10-17T22:51:39Z")

</div>

Hi again!

Another error:

HelloKeypad:17: error: 'Keypad' does not name a type  
HelloKeypad.cpp: In function 'void loop()':  
HelloKeypad:29: error: 'kpd' was not declared in this scope

In the code, "Keypad" is not colored in orange. Is this the problem?

Sorry if this is a stupid question... i started with arduino a few days ago...

---

<div class="post-metadata">

**Author:** ![guix](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/guix/32/215371_2.png) [@guix](https://forum.arduino.cc/u/guix)\
**Post date:** [October 17, 2012, 11:12pm UTC](https://forum.arduino.cc/t/keypad-error/124803/4 "2012-10-17T23:12:48Z")

</div>

I think there is everything you need on this page: [Arduino Playground - HomePage](http://www.arduino.cc/playground/code/Keypad)

Try the examples provided with the library .zip, see how it compile without errors and only then, try to modify it as you want... Good luck 😉

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 18, 2012, 9:06am UTC](https://forum.arduino.cc/t/keypad-error/124803/5 "2012-10-18T09:06:38Z")

</div>

> Try the examples provided with the library .zip, see how it compile without errors and only then, try to modify it as you want.

While you are at it, delete Arduino 1.0.1 and install 1.0. Do not go back to 1.0.1 until they fix the stupid problem where missing include files are OK.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 7:57pm UTC](https://forum.arduino.cc/t/keypad-error/124803/6 "2021-05-05T19:57:03Z")

</div>

Closed on May 5, 2021, 7:57pm UTC


