Page 1 of 1

Problem with LCD I2C

Posted: Sat Jan 20, 2018 3:49 pm
by ylanchec
Hi,

I'm testing : DFROBOT LCD I2C + DF ROBOT Sensor Shield V2.4 + Arduino MEGA 2560 R3.

If i write a long string, on FC7 simulation is good :
test-lcd-i2c-1.png
(153.17 KiB) Downloaded 1147 times
On the target, there is a problem with the lines :
test-lcd-i2c-2.jpg
test-lcd-i2c-2.jpg (354.51 KiB) Viewed 2846 times
Is it a problem with the I2C LCD ? not similar that the generic one ?

Best regards

Yannick

Re: Problem with LCD I2C

Posted: Mon Jan 22, 2018 4:23 pm
by LeighM
Hi Yannick
The issue is to do with how the display controller maps its memory to the display.
What happens after your text runs to the end of the line is not the same with all controllers.
So it is best not to assume the text will automatically run onto the next visible line.
It is best to keep all your text string lengths to be less than or equal to the display character width.
Then use the cursor command to explicitly go to the next line.
Hope that explains it.

Re: Problem with LCD I2C

Posted: Tue Jan 23, 2018 7:25 am
by ylanchec
Hi LeighM,
Thank you for your response !
I will do this.
Yannick