/*
Arduino | hardware-help
AwesomeDude345 — 4:44 PM 9/5/26
Anyone know why my LCD1602 module isn't working in combination
with a 74HC595 Shift Register, checked the pins on the shift register,
using the LiquidCrystal_74HC595 library.
Chip and Wiring works, contrast is ajusting but no test appears.
*/
#include <LiquidCrystal_74HC595.h>
#include <Keypad.h>
/* Keypad setup */
const byte KEYPAD_ROWS = 4;
const byte KEYPAD_COLS = 4;
byte rowPins[KEYPAD_ROWS] = {9, 8, 7, 6};
byte colPins[KEYPAD_COLS] = {5, 4, 3, 2};
char keys[KEYPAD_ROWS][KEYPAD_COLS] = {
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};
#define DS 10
#define SHCP 12
#define STCP 11
#define RS 7
#define E 6
#define D4 5
#define D5 4
#define D6 3
#define D7 2
LiquidCrystal_74HC595 lcd(DS, SHCP, STCP, RS, E, D4, D5, D6, D7);
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, KEYPAD_ROWS, KEYPAD_COLS);
void setup() {
lcd.begin(16, 2);
lcd.print("Hello, World!");
}
void loop() {
char key = keypad.getKey();
if (key) {
lcd.setCursor(0, 1);
lcd.print(key);
//processInput(key);
}
//lcd.setCursor(0, 1);
//lcd.print(millis() / 1000);
//delay(1000);
}