I bought a SainSmart IIC/I2C/TWI Serial 2004 Character 20x4 LCD modul for my yun. The display shows only hieroglyphics. I downloaded the LiquidCrystal_I2C2004V1 and installed in the IDE and I tried the example "Hello World". In the net, I read that I should change the address of LCD from lcd(0x27,20,4) to new (0x3F,20,4). The example doesn't work with 0x27 and 0x3F.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(3,0);
lcd.print("Hello, world!");
lcd.setCursor(2,1);
lcd.print("Ywrobot Arduino!");
lcd.setCursor(0,2);
lcd.print("Arduino LCM IIC 2004");
lcd.setCursor(2,3);
lcd.print("Power By Ec-yuan!");
}
void loop()
{
}
I bought a SainSmart IIC/I2C/TWI Serial 2004 Character 20x4 LCD modul for my yun. The display shows only hieroglyphics. I downloaded the LiquidCrystal_I2C2004V1 and installed in the IDE and I tried the example "Hello World". In the net, I read that I should change the address of LCD from lcd(0x27,20,4) to new (0x3F,20,4). The example doesn't work with 0x27 and 0x3F.