ESP32 LCD Pins Question

I am using an ESP32 and interfacing with a 20x4 LCD (and yes it is 3.3V), using the 6-wire interface.

Now the following code will not work:

#include <LiquidCrystal.h>
LiquidCrystal lcd(12,14,27,26,25,23);
void setup()
{
    lcd.begin(20, 4);
    lcd.clear();
    lcd.print("TEST");
    lcd.setCursor(0,1); 
    lcd.print ("LCD with ESP32");
}
void loop(){}

But this will work:

#include <LiquidCrystal.h>
LiquidCrystal lcd(22,23,5,18,19,21);
void setup()
{
    lcd.begin(20, 4);
    lcd.clear();
    lcd.print("TEST");
    lcd.setCursor(0,1); 
    lcd.print ("LCD with ESP32");
}
void loop(){}

In the first one, have I used some pins I shouldn't have? Both compile fine and upload. I've probably missed something glaringly obvious. But all I did was use different pins and it was working fine.

If you do not know of any alternate designations of any of those pins (and I don't as I do not have an ESP32) then I can only suspect you confused yourself with the wiring in the first case. :grinning:

pin 12 is special.

You can google for esp32 special pins to find more information.

--- bill

ok, so it's not pin 12...:

changing to pin13...

LiquidCrystal lcd(13,14,27,26,25,23);

that doesn't work either.

OK Got it solved. Nothing to do with my original programming. My ESP32 dev board has a misprint on it. G33 is labelled as G23. So nothing wrong with using Pin12 afterall.

The following code worked fine:

LiquidCrystal lcd(12,13,27,26,25,33);