Hello guys, I bought one new 4x4 keypad matrix and it is not working. I connected it like I should and used the example code, but it is not working. I can measure drops with multimeter but Arduino Serial shows nothing. Please help
Here is code:
#include <Keypad.h>
const byte numRows= 4; //number of rows on the keypad
const byte numCols= 4; //number of columns on the keypad
//keymap defines the key pressed according to the row and columns just as appears on the keypad
char keymap[numRows][numCols]=
{
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};
//Code that shows the the keypad connections to the arduino terminals
byte rowPins[numRows] = {5,4,3,2}; //Rows 0 to 3
byte colPins[numCols]= {6,7,8,9}; //Columns 0 to 3
//initializes an instance of the Keypad class
Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);
void setup()
{
Serial.begin(9600);
Serial.print("Started at 9600");
}
//If key is pressed, this key is stored in 'keypressed' variable
//If key is not equal to 'NO_KEY', then this key is printed out
//if count=17, then count is reset back to 0 (this means no key is pressed during the whole keypad scan process
void loop()
{
char keypressed = myKeypad.getKey();
if (keypressed != NO_KEY)
{
Serial.print(keypressed);
}
}
Please define "not working" and post a hand drawn wiring diagram (not Fritzing).
This is my diagram. And not working is that in Serial Monitor is noothing showing up... 
not working is that in Serial Monitor is noothing showing up
Not even "Started at 9600"?
The photo is pretty much useless.
MonsterT:
This is my diagram
No it is a photograph, there is a great deal of difference between the two.
A diagram shows where things are electrically connected for an engineer, a photograph shows the same thing for your mum, who says "that's pretty dear".
Hi,
What speed have you got your monitor set too?
It should be 9600.
What is the spec/data of your keyboard., pinouts etc.
Have you used a DMM to check the pinouts of the keypad?
Thanks... Tom.. 
Hello, guys thanks for replies. I attached my serial and schematics. Please help. 
That is not a schematic.
It does not show the actual key connections, which is required to understand why your code does not appear to read the keypad.
You probably have the keypad wired incorrectly.
Finally, please note that "Started at 9600" was printed out, and this is not "noothing".
Och, guys... Its solved. I just soldered some headers to keypad and now it works fine.
I edited this line of code
byte rowPins[numRows] = {5,4,3,2}; //Rows 0 to 3
byte colPins[numCols]= {9,8,7,6}; //Columns 0 to 3
Now it works fine...
Thanks for help guys.