• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Problem in Using I2C LCD

Q&A Forum › Category: ESP32 › Problem in Using I2C LCD
0 Vote Up Vote Down
Dattatraya Apte asked 6 years ago

Dear Sir,
I was trying I2C LCD with ESP 32 using the following sketch. But the back light is very bright and the letters on LCD are very Faint. I tried to adjust the potentio meter to adjust the contrast but the effect was not much. Can you give me some software solution or hardware solution. 
 

#include <LiquidCrystal_I2C.h>
// set the LCD number of columns and rows
int lcdColumns = 16;
int lcdRows = 2;
// set LCD address, number of columns and rows
// if you don’t know your display address, run an I2C scanner sketch
LiquidCrystal_I2C lcd(0x27, lcdColumns, lcdRows);
void setup(){
// initialize LCD
lcd.init();
// turn on LCD backlight
lcd.noBacklight();
//lcd.setContrast(255);
//lcd.setBacklight(200);
}
void loop(){
// set cursor to first column, first row
lcd.setCursor(0, 0);
// print message
lcd.print(“Hello, World!”);
delay(1000);
// clears the display to print new message
lcd.clear();
// set cursor to first column, second row
lcd.setCursor(0,1);
lcd.print(“Hello, World!”);
delay(1000);
lcd.clear();
}

7 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

I usually solve that problem with the potentiometer to adjust that…
Have you tried to uncomment and change those values to see the effect?

//lcd.setContrast(255);
//lcd.setBacklight(200);

Thanks for asking!

0 Vote Up Vote Down
Dattatraya Apte answered 6 years ago

Yes sir I tried with 

lcd.setContrast(255);
lcd.setBacklight(200);

But there was no change.
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Did you try different values than those (like 0)?

0 Vote Up Vote Down
Dattatraya Apte answered 6 years ago

I will try.
 
Also I have ordered new I2C LCD. There could be a hardware problem in the existing LCD

0 Vote Up Vote Down
Sergio Barreto answered 6 years ago

What voltage are you feeding the LCD? The LCD needs 5V. if you feed it with the 3.3V of ESP32 the letters will look faint.
Greetings.

0 Vote Up Vote Down
Dattatraya Apte answered 6 years ago

Mr. Serigo. Thanks a lot. You are right. I have given 3.3 V supply from ESP 32. That may be the reason for the letters to be faint. I will try with 5 V Supply and see the reasult.

0 Vote Up Vote Down
Dattatraya Apte answered 6 years ago

Mr. Serigo.

Thank you very much for your suggestion. I tried with 5 V supply and my problem is solved. Once again Thank you very much.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.