[SOLVED] I2C LCD 2004A displays gibberish.

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

[SOLVED] I2C LCD 2004A displays gibberish.

Postby GeorgeFlorian1 » Fri Jun 07, 2019 1:50 pm

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 !
Last edited by GeorgeFlorian1 on Fri Jun 07, 2019 2:36 pm, edited 1 time in total.

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

Re: I2C LCD 2004A displays gibberish.

Postby GeorgeFlorian1 » Fri Jun 07, 2019 2:36 pm

Soooo.. the issue was caused by the pins not making contact.
I've properly soldered them and not it works wonders.
Last edited by GeorgeFlorian1 on Wed Jun 12, 2019 10:25 am, edited 1 time in total.

stamasd
Posts: 7
Joined: Sun May 26, 2019 12:24 pm

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

Postby stamasd » Sat Jun 08, 2019 1:13 am

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.

Who is online

Users browsing this forum: No registered users and 65 guests