Hello,
I use the library LiquidCrystal_I2C.h but I don't have the possibility to show a long text. If my text is up to 40 charter, this is cutting on two part. The 41 charter and after is showing on the second line.
#include <LiquidCrystal_I2C.h>
#include <Keypad_I2C.h>
const byte keypadRow = 4;
const byte keypadCol = 4;
byte rowPins[keypadRow] = {0,1,2,3}; // Row 0,1,2,3
byte colPins[keypadCol] = {4,5,6,7}; // Col 0,1,2,3
int keypadArdesse = 0x22; // A0 and A2 GND and A1 5V
char keys[keypadRow][keypadCol] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
const byte lcdRow = 2;
const byte lcdCols = 16;
int lcdAdresse = 0x27; // Default adress
Keypad_I2C keypad = Keypad_I2C(makeKeymap(keys), rowPins, colPins, keypadRow, keypadCol, keypadArdesse);
LiquidCrystal_I2C lcd = LiquidCrystal_I2C(lcdAdresse,lcdCols,lcdRow);
bool backlight = true;
char txtFirstLine[] = "An den exis ti na kanis ela na pame mia megali volta opou 8elis ";
void setup(){
Serial.begin(9600);
keypad.begin();
lcd.init();
lcd.backlight();
lcd.setCursor(0,0);
lcd.printstr(txtFirstLine);
}
void loop(){
char key = keypad.getKey();
if(key){
Serial.println(key);
if(key == 'A')
lcd.scrollDisplayLeft();
if(key == 'B')
lcd.scrollDisplayRight();
}