0

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. – jose can u c Jan 9 '18 at 17:07
1

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.

0

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, privacy policy and cookie policy

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