Hello Community,
I have a Problem with my 20x4 LCD I2C Display.
I connected a 4x4 Matrix keypad and a Lcd display to an Arduino Uno, just for
test purposes.
After the output of the character, it shows this weird 2 characters (see photo).
Heres my code:
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
LiquidCrystal_I2C lcd(0x27, 20,4);
const byte ROWS = 4;
const byte COLS = 4;
char hexaKeys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {3, 2, 8, 9};
byte colPins[COLS] = {7, 6, 5, 4};
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
void setup(){
Serial.begin(9600);
lcd.init();
lcd.backlight();
}
void loop(){
lcd.setCursor(0, 0);
char customKey = customKeypad.getKey();
if (customKey){
lcd.println(customKey);
}
}
Hope someone can help me. Thanks!!