This tutorial explains how to use LCD for displaying purpose on ESP8266 using LUA programming. We are using 16x2 character LCD in this tutorial. This tutorial has got LUA file you can include that file in your existing project to use LCD.
You need to have basic understanding of ESP8266, below mentioned tutorials of Robo India may help you out in this.
The basic setup of ESP should be done along with basic setup make the following circuit.
We are using I2C LCD backpack here in this tutorial. Mount 16x2 LCD to the I2C LCD backpack.
Before moving ahead to the programming you must know the i2c device no of the LCD Backpack, here is a tutorial of Robo India for I2C scanning.
once you know i2c address of LCD download the following file lcd.lua open the same and enter address of i2c on line no. 7th. In our case our i2c address is 0X3F.
4. Calling the function:
The lcd.lua file has got following functions.
4.1 General Functions:
1. For clearing screen -
2. Set cursor at Column 0 and Row 0
3. To show cursor
4. to hide cursor
4.2 Printing functions:
Rows can be 1 and 2. Columns can be 0 to 15.
example - dofile("lcd.lua").lcdprint("Hello World!",0,0);
4.3 How to run these functions:
Just copy and paste these functions to ESPlorer or any other interfacing software with ESP8266 and you will see the result on LCD screen.
If you have any query please write us at firstname.lastname@example.org
our whatsapp helpline: +91 9694011188
Thanks and Regards
Content Development Team