Another illustration that demonstrate how to wire the i2c 16×2 LCD on ESP8266 12 Known as NodeMCU, as you can see the diagram below the SCL as Arduino Analog Pin A4 is connected to D1 on NodeMCU at the same time the D2 as the SDA represent as Analog Pin A5 on Arduino Board, As you may notice that the sketch code that we used it is not LUA script it is actually standard Arduino C compiled/Interpret by Arduino IDE. If you don’t have an ESP8266 runs on Arduino IDE please follow this link.




Required Devices

  • NodeMCU 12,12E
  • LCD16x2 on i2C Module
  • Jumper Wires / DuPont Wires

Wiring Diagram

NodeMCU-LCD-Screen-i2c-16x2-Display

Note: Some 16×2 LCD display module required 5v vcc.

Sketch Code



Wiring NodeMCU ESP8266 12E with i2C 16×2 LCD Screen
Facebooktwitterredditpinterestmail
Tagged on:     

JLCPCBPCBgogoPCBway4pcb

17 thoughts on “Wiring NodeMCU ESP8266 12E with i2C 16×2 LCD Screen

  • at
    Permalink

    Hello 14core, i’m doing everything you said and the screen turn on, but it doesn’t show anything. There is a step that i missed?

    Greetings!

    Reply
    • at
      Permalink

      Hi, you must use a 5V power supply instead 3.3V as shown on the wiring diagram. Them set a contrast by small potentiometer on botom of I2C expander.

      Reply
  • at
    Permalink

    LiquidCrystal_I2C lcd(0x3F, 20, 2);
    —————————————————————————————
    LiquidCrystal_I2C lcd(0x3F, 20, 4); < — check your i2c address
    I2C Address: 0x3F
    lcd.begin (16,2); // Change this to 16,4 if your using 16×4 LCD Display

    Reply
  • at
    Permalink

    I have one line full of blocks and one empty line. thx

    Reply
    • at
      Permalink

      Check your I2C Module if it is soldered properly, check also your voltage supply if does not support with 3.3v used 5v ground should be connected to common ground must try to use transistor to isolate the flow. don’t forget your i2C address of your module which is attach to your LCD. most module works on (0x3F);

      Reply
  • at
    Permalink

    Use and Arduino I2C scanner to find the address of your LCD board.

    Reply
  • at
    Permalink

    Hi, trying to compile I get thise error:
    fatal error: avr/io.h: No such file or directory
    Can u help me?

    Tks

    Reply
    • at
      Permalink

      Fatal Error: AVR/IO.h come from your IDE check your ESP8266 Arduino IDE integration, make it sure you select the proper board on your board manager along with the required libraries.

      Reply
  • at
    Permalink

    Can I just copy and past this code in my sketch?

    Reply
  • at
    Permalink

    Your diagram is wrong. D2 = A4 (SDA) and D1 = A5 (SCL)

    Reply
  • at
    Permalink

    It woesn’t work with 3.3v, you need have 5 volts for display. I spent 3 days until I found that, so could you mention that in your guide, thanks

    Reply
  • at
    Permalink

    my d2 pin is already pinned to another thing. can i use other digital pins instead? like d0 or d3

    Reply
  • at
    Permalink

    Hi 14 Core,
    I’m using an ESP8266 12E NodeMCU with an LCD2004 20×4
    I’m using your code, the screen turns on but I don’t see any Text on it. I have set the contrast to the maximum.
    Could you please help.
    Thank you

    Reply

Leave a Reply

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