Keypad error

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?

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!

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

I think there is everything you need on this page: 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 ;)

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.