The strange problem is that when I press "2" key, the output is "1" and when I press "0" key I get "*"! I try disconnecting the keypad and short connect the corresponding pins the see if it is the keypad problem or what but I got the same output! Another tip is that when I press these two keys with right key of them ("1" with "3" and "0" with "#") I get the correct output!
xubin:
Thank you guys. Change my code to following, worked:
You should not change the layout of your Keypad to make it working. Follow logical reasoning and then try to fix the problem. What is 3? This is not available in your following diagram.
GolamMostafa:
You should not change the layout of your Keypad to make it working. Follow logical reasoning and then try to fix the problem. What is 3? This is not available in your following diagram.
OOps! I updated the code, it is D3 in my code, but it was not working correct till I changed the layout!
xubin:
OOps! I updated the code, it is D3 in my code, but it was not working correct till I changed the layout!
You have changed the layout, and it works; that does not mean that the problem is solved. Keep the layout as it is and then try to make it works; only then your problem is solved.
Do you have the following keypad (Fig-1) which is fully compatible with the Keypad.h Library. If you have, use this Keypad and make the system working and then do experiment with your custom Keypad.
Figure-1: