Page 1 of 1

20x4 Display not working

Posted: Sun Jul 03, 2016 6:03 am
by Chris
Hi guys. After finally getting the Clock/Temp sorted the way I want it using the Mega with a LCD Shield I wanted to try and get a 20x4 Display with backpack on the Mega instead. Couldnt get anything to work. The reason Im posting in the Eleven section is I can at least get something working with the Hello World sketch.

Code: Select all

//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,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()
{
}
Unfortunately though Im only getting the first letter on each line, so

H
Y
A
P

Anyone have any ideas.

Chris

Re: 20x4 Display not working

Posted: Sun Jul 03, 2016 10:32 am
by Chris
In case anyone comes across this post and has the same issue, it turned out to be that the older version of the IDE needed to be used. 1.0
1.6.9 wasnt compatable

Thanks