hi friends;
1 2 3
4 5 6
7 8 9
0 *
A B C
? have this model keypad row=5 col=3
my code
#include <Keypad.h>
const byte ROWS = 5; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'},
{'A','B','C'}
};
byte rowPins[ROWS] = {2, 3, 4, 5,6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {7, 12, 13}; //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 != NO_KEY){
Serial.println(key);
}
}
bu I want use lcd 16X2, then HOW I USE CODE ??
1== button pressed 1
2== button pressed 2
..