Driving a parallel 2×16 LCD from an ESP8266 Wemos D1

There are a lot of tutorials out there describing how to drive a 2×16 Liquid Crystal Display from a Wemos D1 using an I2C adapter. Since I didn’t have an I2C serial interface handy, I connected it directly to my Wemos D1, and will be controlling using the parallel control pins, using the LiquidCrystal library.

You’ll need:

  • Wemos D1 Mini or similar, we will use 6 pins for the LCD
  • Liquid Crystal Display, I used a back-lit 2×16 unit

Wiring details:

LCD PinWemos D1 PinUse
3GNDContrast - connect using a potentiometer if you want to adjust it
48LCD control
5GNDLCD control
67LCD control
115LCD data
124LCD data
133LCD data
142LCD data
155VBack-light Vcc - connect using a potentiometer if you want to adjust it
16GNDBack-light GND

Source code:

At this point, we can load a basic sketch to test the LCD. The below code will simply initialize the LCD display and write a simple message to it.

#include <LiquidCrystal.h>;

// Initialize LiquidCrystal as LCD with the proper pins
LiquidCrystal lcd(D8, D7, D5, D4, D3, D2);

void setup() {
// Initialize the LCD with the proper number of columns and rows
lcd.begin(16, 2);

// Print a welcome text and wait 3 seconds
lcd.print(" Welcome to")
lcd.setCursor(0, 1);
lcd.print(" /etc/what!");

void loop() {

Fork it on GitHub

Moving forward

Now that we have basic LCD functionality working, we can start tinkering with different data sources, such as sensors or maybe even an MQTT broker to receive messages to display.
In a future post, we will be adding a DHT22 sensor that measures temperature and humidity, and displays it on the LCD.

Leave a Reply

Your email address will not be published. Required fields are marked *