Lcd I2C 16x2 doesn't work

i'm using an lcd I2C for my project for school but it won't work since i updated my software to 1.8.15. It also can't find the lcd.clear(); function.
can someone pls help me?

Never heard of that one - what does it do?

Please remember to use code tags when posting code

sorry i meant lcd.clear();

Hi, @seppe_t
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".

A copy of your code would help us to find solutions to your problem.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

so i'm using an arduino uno and LCD i²c 16x2. i'm using the aurduino software 1.8.15 and using the code down below. i have installed the LiquidCrystal_I2C from the library. i know that my I2C ardess is 0x3D. after now trying for 2 hours i'm only getting the firts letter of the word. the rest of the text does not appear.

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3D, 16, 2);


void setup() {
  lcd.init();
  lcd.backlight();
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("hello");
  lcd.setCursor(0, 1);
  lcd.print("world");
 
  delay(1000);
}

void loop() {
}

Hello
there are a lot of tutorials available online.

i tried multiple tutorials but it still doesn't work...

I'd try slowing it down, try sending a character at a time, separated by, say 50ms.

OK, well you have the contrast control set and it is actually responding to your code.

In the IDE Library Manager, install the "HD44780" library and use the I²c examples given.

The LiquidCrystal_I2C library is very old and not maintained. It does not work with certain IDE versions.

Hi,
Can you check and resolder the EN pin please?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

i would be try so:

void setup() {
  lcd.init();
  lcd.backlight();

  lcd.clear();
  delay(1000);

  lcd.setCursor(0, 0);
  lcd.print("hello");
  lcd.setCursor(0, 1);
  lcd.print("world");
 }

i did resolder it and tried the code from kolaha. it works now!! thank you guys!!!

1 Like

@seppe_t wait. try now your old code

It is not a problem with your code or you backpack or its soldering.
It is a problem with the library you are using.
You have a version of the LiquidCrystal_I2C library that has a bug in it.
This is a well known issue that was fixed years ago.
Not sure where you got the library you are using but there are many copies and different versions of it floating around out there on the net.
While there is one available in the IDE library manager it too has some issues since it is no longer being actively maintained.
I would suggest that you switch to the hd44780 library and use the hd44780_I2Cexp i/o class.
It is available in the IDE library manager, and is actively maintained.
It will automatically determine the I2c address, has some additional capabilities and is faster.
After you install it, spend at least a few minutes looking over the included documentation (it is quite extensive), to get a feel for the format of the library and where the examples are located, then run the included I2CexpDiag to test the backpack and the LCD.
Then you can run any of the hd44780_I2Cexp i/o class examples and start using the library for your own sketches.

--- bill

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.