/*Write a program to interface LCD and keypad (4 X 4) , to exhibit the functionality of a
basic calculator.
1 2 3 4
5 6 7 8
9 0 + -
/ * Clear Enter*/
#include <keypad.h>
byte rows=4;
byte cols=4;
char keys[rows][cols]={
{'1','2','3','4'}
{'5','6','7','8'}
{'9','0','+','-'}
{'/','*','Clear','Enter'}
};
keypad keypad =keypad(makekeymap(keys)),rpins,cpins,rows,cols);
void setup() {
Serial.begin(9600);
}
void loop() {
char key=keypad.getkey();
if (key!=no_key)
Serial.println(println(key));
}