Liquid crystal I2C

New to Arduino.....Having issues with I2C display. Wired in 16x2 display with correct code but, only first two letters print. Code below

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

LiquidCrystal_I2C lcd(0x27, 16,2); // I2C address 0x27, 16 column and 2 rows Initialize the LCD.

void setup() {
// put your setup code here, to run once:
lcd.init(); // initialize the lcd
lcd.backlight();
lcd.setCursor(0,0); // move cursor to (0, 0)
lcd.print("hello"); // print message at (0, 0)
lcd.setCursor(1,1); // move cursor to (1, 1)
lcd.print("world"); // print message at (1, 1)

}

void loop() {
// put your main code here, to run repeatedly:

}

A couple of quick reads will help you help us help you:

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966/2

A moderator will likely move your post to a more appropriate category.
C

Welcome to the forum

Your topic was MOVED to its current forum category as it is more suitable than the original

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

you have very likely installed an old and outdated version of the i2c library.
delete the current library in your library folder and do a new installation of the library from the library manager.

If you don't mind to install via ZIP file, you can take a look at Noiasca Liquid Crystal

please read again the forum how to, how to post code in code tags so that code gets represented correctly.

The library that you are using is, indeed, an older library that has not been maintained.

There is another very good library for I2C enabled hd44780 controlled LCD character displays (1602, 2004, ... ). It is the hd44780 library by Bill Perry. That library will autodetect the I2C address and the pin mapping between the LCD and I2C backpack. The library is available via the IDE library manager. There is extensive documentation and example code that comes with the library.

1 Like

That worked!!!!
Thank you

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