LCD display on Nano ESP32

Hi all,

I know that's likely a noob question, but it's 2 days I'm trying to figure it out and I can't get anything out of it.
First experience with Arduino, no big previous experience with electronics in general (I have a big of general knowledge, nothing too specific), so I apologize in advance if I say something stupid.

Down to the issue: I bought an Arduino nano ESP32 ( https://docs.arduino.cc/tutorials/nano-esp32/cheat-sheet/ ), and a backlit LCD display 16x2 (that arrived with some bent pins, but y the look of it everything else seems fine... as fine as it may look).
I followed some tutorials on ho to wire things up and the screen lights up and shows the 1st row of white boxes (i.e. as far as I understood the LCD is ready to be initialized).
I have the potentiometer for contrast and it's working.
But, as you may expect, when I try to write something to the screen nothing is shown.
I saw several similar cases on the forum, tried to understand what I am doing wrong, but couldn't figure it out.

So, the current schema I have is:

Column 1 Column 2 Column 3 Column 4
LCD pin Arduino PIN
VSS Ground
VDD +5V
V0 (central pin potentiometer)
RS D9
RW ground
E D8
D4 D4
D5 D5
D6 D6
D7 D7
A +5V with a 6.7kOhm resistor
K ground

The code looks like this:

#include <LiquidCrystal.h>

const int rs = 18, en = 17, d4 = 7, d5 = 8, d6 = 9, d7 = 10;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.setCursor(0, 0);
  lcd.print("hello, world!");
  lcd.setCursor(0, 1);
  lcd.print("bye, world!");
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  //lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  //lcd.print(millis() / 1000);
  digitalWrite(LED_BUILTIN, HIGH);
  delay(250);
  digitalWrite(LED_BUILTIN, LOW);
  delay(250);
}

Do you see anything wrong with what I've done? And what it would be? :smile:

I see a difference in the table and the program which pins are connected. Are you using a level shifter? ESP32 works on 3.3. volts and the LCD display at 5 volts. Be careful because you might burn something.

All lines are output; so, there is no threat from the LCD to the NANO ESP32 in respect to arrival of 5V logic to any pin of the NANO ESP32.

The OP is advsed to operate LCD using separate 5V supply and to tie togther the common GND-points of 5V supply, LCD, and NANO ESP32.

hmm... okay, will try to get some external 5V.
So even if the display turns on and the contrast seems to be working, the problem could be not enough power?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.