Lcd doesn't capture input from keypad button

Hi, Good Afternoon!

I’m currently working on interfacing a 3x4 keypad with 4x16 lcd screens with an Arduino Uno(attached). The components that I used are shift register 74HC595, Uno, keypad, contrast, lcd and 4 resistors(220ohm).

The objective is to allow the lcd screen to show the button that is being pressed on the keypad (such as, pressed “A” on the keypad and shows “A” on the lcd screen.

The issue currently I’m facing is this, whenever I pressed a button on the keypad, the Arduino RX lights but does not show anything on the screen.

Please advise on how can I allow the lcd to capture the button I pressed on the keypad. Thanks alot.

The code that I used is:

/* @file HelloKeypad.pde
|| @version 1.0
|| @author Alexander Brevig
|| @contact alexanderbrevig@gmail.com
||
|| @description
|| | Demonstrates the simplest use of the matrix Keypad library.
|| #
*/
#include <Keypad.h>

const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){
  Serial.begin(9600);
}
  
void loop(){
  char key = keypad.getKey();
  
  if (key){
    Serial.println(key);
  }
}

It would seem to me that if you expect to see anything on your LCD display then your program should somehow involve the LCD, most likely by means of a library.

Similarly if you expect to use your shift register there should be some code to deal with it. This may be occurring in your keypad library but we don't know anything about that either.

Keep in mind that the LiquidCrystal library does not handle the third and fourth rows of a 16x4 display correctly. It will 'work' but those two lines will be offset on the display.

Don