Difference between revisions of "LCDDisplay"

From Let's Control It
Jump to navigation Jump to search
m (Add link to System Variables)
m
Line 17: Line 17:
 
   SCL GPIO 2
 
   SCL GPIO 2
  
= Software =
+
= ESP Easy =
 
 
== Custom sketch ==
 
 
 
== ESP Easy ==
 
 
Use the device tab on the ESP Easy webinterface and create a new task by editing one of the available tasks. Select "LCD Display" from the dropdown box.
 
Use the device tab on the ESP Easy webinterface and create a new task by editing one of the available tasks. Select "LCD Display" from the dropdown box.
  
Line 41: Line 37:
  
  
=== HTTP control command ===
+
== HTTP control command ==
 
You can also control the LCD Display by remote http commands send from your Home Automation Controller or any other device that can send http get requests.
 
You can also control the LCD Display by remote http commands send from your Home Automation Controller or any other device that can send http get requests.
  

Revision as of 12:51, 22 June 2017

Introduction

The ESP8266 module can be used to control an I2C LCD Display. Mainly to display sensor values locally.

Hardware

LCDDemo.jpg

Connect the LCD Display to the I2C interface. This display works with 5 volt VCC, but the I2C connections should be "floating". The 2004 display from "Funduino" that we used in our testlab could be connected without levelshifters.

Connections

WARNING: Some LCD Modules might have pullup resistors to 5 volts VCC. In that case a levelshifter should be used

 LCD 	 	ESP-01
 GND 	 	GND
 VCC    	-
 SDA		GPIO 0
 SCL		GPIO 2

ESP Easy

Use the device tab on the ESP Easy webinterface and create a new task by editing one of the available tasks. Select "LCD Display" from the dropdown box.

Enter template texts into lines 1 to 4. Plain text will be shown on the display exactly as entered. If you want to show a value, enclose <task name> and <value name> between brackets, separated by a hashtag.

So if you have a dallas sensor running, with taskname "Dallas", to get the temperature value, use this:

 [Dallas#Temperature]

For available System Variables, See:ESPEasy_System_Variables

Check this sample on how to get it done:

EasyConfigLCD.png


(The IDX field will be stuffed with '1', because it's needs a value. But nothing will be send with this device)


HTTP control command

You can also control the LCD Display by remote http commands send from your Home Automation Controller or any other device that can send http get requests.

Command format:

http://<ESP IP address>/control?cmd=lcd,<row>,<col>,<text>

It is also possible to switch the LCD on or off , or clear the display. During the off state, the content will be updated according to the latest values or states.

http://<ESP IP address>/control?cmd=lcdcmd,on

http://<ESP IP address>/control?cmd=lcdcmd,off

http://<ESP IP address>/control?cmd=lcdcmd,clear

The on/off commands control the backlight of the LCD, so it will only work on backlit models.