#include <LiquidCrystal.h>
#include <Keypad.h>
/* Display */
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
/* Keypad setup */
const byte KEYPAD_ROWS = 4;
const byte KEYPAD_COLS = 4;
byte rowPins[KEYPAD_ROWS] = {5, 4, 3, 2};
byte colPins[KEYPAD_COLS] = {A0, A1, A2, A3};
char keys[KEYPAD_ROWS][KEYPAD_COLS] = {
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, KEYPAD_ROWS, KEYPAD_COLS);
uint64_t value = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
lcd.begin(16, 2);
//showSpalshScreen();
lcd.clear();
lcd.cursor();
lcd.setCursor(0, 0);
}
void processInput(char key) {
lcd.print(key);
return;
}
void loop() {
// put your main code here, to run repeatedly:
//updateCursor();
char key = keypad.getKey();
if (key) {
processInput(key);
}
}