I have an I2C LCD screen provided with a Sunfounder kit and certainly built by DFRobot or such a constructor (there is nothing written on the LCD), and an Arduino Uno R3 copy.
My issue is when I use lcd.print() to write a string on the LCD, only the first character of the string is printed. I can only print on other positions by using setCursor but only one character at a time.
I tried to change libraries (https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library, the one supplied with the LCD...), It always behaves the same!
For example, here's a very simplistic program which exhibits this behavior:
#include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display void setup() { lcd.init(); lcd.backlight(); } void loop() { lcd.print("write"); delay(1000); lcd.setCursor(10, 0); lcd.print("p10"); lcd.setCursor(0, 1); lcd.print("0, 1 write"); if((millis() / 1000) % 5 == 0) { lcd.clear(); delay(1000); } } I end up with something like:
w p 0w On the screen (before the clear() occurs of course).
Instead of something like:
write p10 0, 1 writewrite The lcd itself was ok some time ago. The only thing I could think is I recently updated to Arduino 1.6.6. Can it be a bug in the compiler?
The hello world from DFRobot also doesn't work properly (first char only, again) (please note to make it display something with my LCD I have to change the address from 0x20 to 27).