Page 1 of 1

[SOLVED] I2C LCD 2004A displays gibberish.

Posted: Fri Jun 07, 2019 1:50 pm
by GeorgeFlorian1
Hello !

I am trying to use a LCD Display 20x04 with a DevKitV4 Wrover-B, but I am having no luck.

I have followed this link: https://randomnerdtutorials.com/esp32-e ... duino-ide/

SDA to GPIO 21
SCL to GPIO 22

I've used this library: https://github.com/johnrickman/LiquidCrystal_I2C

And here is a simple code that doesn't work:

Code: Select all

#include <Arduino.h>
#include <LiquidCrystal_I2C.h>

// LiquidCrystal_I2C lcd(0x27,16,2);
LiquidCrystal_I2C lcd(0x3F,20,4);

void setup() {
  Serial.begin(115200);
  delay(500);
  lcd.init();                      // initialize the lcd 
  // 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've scanned for the I2C address and it returns: 0x27. But I've found online that 0x3F is usually the address for 20x04 and 0x27 is for 16x02.

The LCD outputs gibberish with both 0x27 and 0x3F.
Image

Does anybody has any idea ?
Thank you !

Re: I2C LCD 2004A displays gibberish.

Posted: Fri Jun 07, 2019 2:36 pm
by GeorgeFlorian1
Soooo.. the issue was caused by the pins not making contact.
I've properly soldered them and not it works wonders.

Re: [SOLVED] I2C LCD 2004A displays gibberish.

Posted: Sat Jun 08, 2019 1:13 am
by stamasd
I was about to say, I've had this problem before with a 1602 display and it was caused by bad solder joints. Glad you found the issue and solved it. Some of these displays can be of poor quality.