LiquidCrystal_I2C

My lcd display is displaying only first letter of code:

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

LiquidCrystal_I2C lcd(0x27,16,2);

void setup()

{
lcd.init();
lcd.backlight();
lcd.print("Hello, world!");
}

void loop()

{
}

Please help fix this problem.

Could you try this library instead?

I tried to compile your code for Uno and 'cos I'm using library behind my link below, it will cause an error 'class LiquidCrystal_I2C' has no member named 'init' so line lcd.init() is an issue..

Arduino-LiquidCrystal-I2C-library

With this library you'll use lcd.begin(); instead and it's working.. Dunno why your code doesn't work isn't but changing the library is one solution.. In this library, Hello World.ino would look like this:

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

// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()
{
	// initialize the LCD
	lcd.begin();

	// Turn on the blacklight and print a message.
	lcd.backlight();
	lcd.print("Hello, world!");
}

void loop()
{
	// Do nothing here...
}

TommiP

Good day Emil, good day TommiP, :slight_smile:

I am a very Newbie with the arduino platform.

Until now, the same problem appears on my project.
I had the same code as Emil and it was working in the automated default arduino installation of linux ubuntu.
(with sudo apt-get install arduino arduino-core) -> Arduino IDE V 1.0.x

I moved to the last version of arduino 1.6.6 beta to have the library manager which was not implemented in that previous version.

There is no troubleshooting during compilation and targetting but the function "print" with the original LiquidCrystal_I2C.h display only one character.

The library was updated according to TommiP requisitis and the problem is still alive in my configuration.

(old lib is removed and new lib is in the '/arduino/libraries' directory)

I tried as well with this :

LiquidCrystal_I2C lcd(0x27,16,2,16);  // set the LCD address to 0x27 for a 16 chars and 2 line display

instead of

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

Result is the same.

Any idea?

Try searching for the phrase I2C LCD in the search box at the upper right.

Surely you will find some ideas in the resulting forum threads.

Don

Ok,
I found this topic :

http://forum.arduino.cc/index.php?topic=128635.0

The problem is solved. :wink:

I wish I could find what was happening there.

thx !

PS: Very nice, the I2C scanner.

That takes care of the hijacker, now how is the original poster doing?

Don

A lot of Liquid Crystal I2C displays are at 0x3F and not 0x27.

Present recommendation is to use the HD44780 library by installing it in the IDE.

The example program supplied with it will sort out all the details for you. :grinning:

Paul - you forgot to look at the date on the posts.

Don

No, I didn't. :roll_eyes:

Check the dates again - it was djcleckie_2 that "retro'd" it. :grinning:

Not my bag, baby!

Let me revise that.

Paul - you forgot to look at the date on the posts mention to djcleckie_2 that the original poster had probably gotten things working in the intervening years.

Don

Possibly because you didn't initially pay attention to the date on the posts.

I presumed that he realised that. :grinning:

Not that I cared though - if he was just adding something "for completeness", then so was I. :sunglasses:

Now you were involved in the OP and you have popped up to respond to this rather than any other. Suggests to me that you have notifications set. (I don't bother. :roll_eyes: )