Hi all, so i found this website Matrix Keypad - reducing the pins from 8 digital to 1 analog on Arduino [How to] »
That way, i can use the 4x4 membrane keypad with only 1 analog pin. I've tried it and it worked.
My question is how can i press more than 1 button so it will become one like "123" just like in the calculator? and can i make the input from keypad to string data type?
Here's my codes
#include
#define analogPin 0
AnalogMatrixKeypad AnMatrixKeypad(analogPin);
void setup(){
Serial.begin(9600);
}
void loop(){
char Key = AnMatrixKeypad.readKey();
if(Key != KEY_NOT_PRESSED)
Serial.println(Key);
}