Hello all,
I am new in that platform, Hope someone gives some guidance or instruction for my project.
I try to get input from the 3*4 keypad. I have the code for a single digit, but I need 4-6 multiple digits variables codes.
Any advice would be greatly appreciated!
Thank you.
Here is my code,
#include<Wire.h>
#include <Keypad.h>
const byte rows = 4; //4 rows
const byte cols= 3; //3 columns
char Keys[rows][cols] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
byte rowPins[rows] = {13,12,11,10};
byte colPins[cols] = {A0,A1,A2};
Keypad customKeypad = Keypad( makeKeymap(Keys), rowPins, colPins, rows, cols);
void setup() {
Serial.begin (9600);
delay (50);
}
void loop(){
char customKey = customKeypad.getKey();
if (int(customKey) !=0)
{
Serial.pirntln (customkey);
}
}