how to interface 4 x 4 membrane keypad on LCD keypad shield

Hi All,

I have Arduino uno board interfaced with LCD keypad shield(DF ROBOT). I want more keys for some other functions(Like quantity,search by number etc.,). I have 4 x 4 membrane keypad, i don't no how to interface with LCD keypad shield.Any idea is it possible to interface with LCD keypad shield.If so kind some one suggest which pins to configure(Like for LCD we have configured 8,9,4,5,6,7).

Thanks & Regards
JR

Hi All,

I got the solution, but the problem is the second row and last column is not working properly.Some one please run this code and suggest me, what is wrong with the code.Below is the out put what i am getting from serial port.

1 1 3 A
4 4 6 B
7 7 9 C
7 6 9 C

Regards
JR

//#include <EEPROM.h>
#include "Keypad.h"
#include <Wire.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
int currentMenuItem = 0;
int lastState = 0;
int prices[] = {0, 52, 70, 15, 62, 75, 175};
int tot[] = {0, 0, 0, 0, 0, 0, 0};
int qty[] = {0, 1, 1, 1, 1, 1, 1};
int i;
int sum;
const byte numRows= 4; //number of rows on the keypad
const byte numCols= 4; //number of columns on the keypad
char keymap[numRows][numCols]=
{
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};
//Code that shows the the keypad connections to the arduino terminals
byte rowPins[numRows] = {2,3,11,12}; //Rows 0 to 3
byte colPins[numCols]= {A2,A3,A4,A5}; //Columns 0 to 3

//initializes an instance of the Keypad class
Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);

void setup() {
   lcd.begin(16, 2);
   Serial.begin(9600);
   clearPrintTitle();
}
//Print a basic header on Row 1.
void clearPrintTitle() {
   lcd.home();
  lcd.setCursor(0, 0);
  lcd.print("TEST");
  lcd.setCursor(0, 0);
 }
void loop() {
  
  //Call the main menu.
  mainMenu();
   char keypressed = myKeypad.getKey();
if (keypressed != NO_KEY)
{
Serial.print(keypressed);
}
}