#include <I2CKeyPad.h>
#include <Keypad.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define KEYPAD_ADDR 0x20
#define LCD_ADDR 0x22
LiquidCrystal_I2C lcd(LCD_ADDR, 16, 2);
const byte ROW_NUM = 4; // Four rows
const byte COLUMN_NUM = 4; // Four columns
char keys[ROW_NUM][COLUMN_NUM] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROW_NUM] = {0, 1, 2, 3}; // Assign the row pins connected to PCF8574 (P0-P3)
byte colPins[COLUMN_NUM] = {4, 5, 6, 7}; // Assign the column pins connected to PCF8574 (P4-P7)
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROW_NUM, COLUMN_NUM);
void setup()
{
Wire.begin();
// Start the Serial Monitor
Serial.begin(9600);
}
void loop()
{
}