I connected a 16x2 LCD display to a Arduino Uno. Then I tested a "Hello, Word" code and it works perfect. Now I want to do the same with a Wemos D1 Mini but it doesn't work.

Here the Wemos is not connected to USB:

16x2 LCD connected to Wemos (front) 16x2 LCD connected to Wemos (rear)

This os the "Hello, World" code. I needed to change the name of the pins (maybe this is the problem):

#include <LiquidCrystal.h>

const int rs = 8, en = 7, d4 = D5, d5 = D4, d6 = D3, d7 = D2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  lcd.begin(16, 2);
  lcd.print("hello, world!");

void loop() {
  lcd.setCursor(0, 1);
  lcd.print(millis() / 1000);

This is the result (potentiometer works perfect):

Display is on but empty

  • 1
    A first step might be to clear out the code in loop() so that you can narrow down the issue. Just do the items in setup() so they happen only once. After you get text there, you can move on to more complex action. Of note, though, is that Wemos boards are 3.3V and LCDs are typically 5V. It doesn't look like you're level-shifting, though. Commented Jan 9, 2018 at 17:07

3 Answers 3


You are doing it on wemos d1 mini isnt it ?

Then you dint include its header files, Did you check the "LiquidCrystal.h" has definitions for wemos pinouts?

Your lcd is fine, n wemos too, its just your configuration is wrong.

Check those and update here.


Although an old question, i just ran into the excat same issue.
The problem is that the pin numeration on the wemos D1 isn't the same as on the arduino.
I've followed the liquid crystal arduino tutorial but changed the numeration of the pins to

const int rs = 12, en = 13, d4 = 14, d5 = 4, d6 = 5, d7 = 16;

Now, at least for me, the display works as it should

  • thx, or can be defined like: const int rs = D6, en = D7, d4 = D5, d5 = D2, d6 = D1, d7 = D0;
    – To Kra
    Commented Nov 22, 2020 at 20:42

Three possibilities (it's impossible to be more accurate from your description):

  1. The display isn't wired to the pins you specified in your sketch
  2. The display doesn't accept 3.3V signals when run from 5V
  3. The display doesn't function when run from 3.3V

It's certainly not being initialized, which tells me that the instructions for setting it up aren't getting through, or aren't being executed when they do get through.

You can:

  1. Use an oscilloscope or logic analyzer to confirm the right pins are in use,
  2. Try powering the display from 3.3V if it's currently powered by 5V
  3. Try powering the display from 5V if it's currently powered by 3.3V

If it's powered by 5V you may want to consider adding some logic level translation to boost the IO signals from the Wemos to 5V.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.