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:
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):
loop()
so that you can narrow down the issue. Just do the items insetup()
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.