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

Sketch Code



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

13 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

    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

Leave a Reply

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