PlatformIO Community

LiquidCrystal_I2C Library bug or..?


#1

I have a 20x4 (russian) LCD LC2041/BMDWH6-D02/1821 RC
Currently I returned from vacation and trying to use it in my test project

Code is simple (stm32f103, stm32duino):

#include <Arduino.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,4);

void setup()
{
  lcd.init();
  lcd.clear();
  lcd.backlight();
  lcd.setCursor(0, 0);
  lcd.print("12345678901234567890");


  lcd.setCursor(0, 1);
  lcd.print("12345678901234567890");
  lcd.setCursor(0, 2);
  lcd.print("12345678901234567890");
  lcd.setCursor(0, 3);
}

void loop()
{

  lcd.setCursor(16,1);
  lcd.print(millis()/1000);
  delay(1000);
}

So, code is working, but display showing only 16 cols and 2 rows, such as original 16x2 display has, instead of 20 cols and 4 rows. Symbols at right are stripped.

What did I does wrong?


#2

Maybe change this to (16,3)?


#3

Which version of LiquidCrystal_I2C? There are quite a few of them around.

And do you mean that you only got 16x2 output even through it was a 20x4 display and you had 20 characters for for lines 0, 1 & 2?


#4

Sorry, my LCD was broken. Please close this post.