Difference between revisions of "NEXTIONDisplay"
Line 1: | Line 1: | ||
= Introduction = | = Introduction = | ||
+ | |||
+ | [[File:WIP.jpg]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
The ESP8266 module can be used to control an Serial Nextion Display. | The ESP8266 module can be used to control an Serial Nextion Display. | ||
Due to its on-board intelligence and the presence of a touch panel, the display can be used to control devices. | Due to its on-board intelligence and the presence of a touch panel, the display can be used to control devices. |
Revision as of 14:09, 21 May 2018
Introduction
The ESP8266 module can be used to control an Serial Nextion Display. Due to its on-board intelligence and the presence of a touch panel, the display can be used to control devices.
Hardware
The board is connected to a controller by means of 4 wires
Connect the Nextion Display to a serial port and to +5 V and ground. The Nextion software module provides the use of a Software Serial port. So, it is not required to use the 'native'Tx and Rx ports of the controller. This display works with 5V and can be connected directly to the ESP module.
Connections
LCD ESP GND GND VCC VCC Tx GPIO port acting as Rx Rx GPIO port acting as Tx
In order to get those displays to work properly you need to activate the pull-up of the Tx pin. A quick test is to set the pin to high (1) but for long turn you should enable the pull-up instead. If the pin is missing a pull-up you can add one yourself by soldering a 10k resistor from 3.3V to the pin.
ESP Easy
Use the device tab on the ESP Easy webinterface and create a new task by editing one of the available tasks. Select "Display - OLED 1306" from the dropdown box.
Enter template texts into lines 1 to 8. 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]
With release 057, some features were added. If you put %sysname% or %ip% or %systime% on a line in the table, the display will show either the name you gave the ESP module, its IP address or its time. The latter only when NTP is being deployed.
Check this sample on how to get it done:
(The IDX field will be stuffed with '1', because it's needs a value. But nothing will be send with this device)
Commands
Command | Value | Extra information |
---|---|---|
OLED,<row>,<col>,<text> | - | Write text messages to OLED screen, ROW for row, COL for starting column, and Text for text. |
OLEDCMD,<value> | on, off, clear | Switch on or off the OLED or to clear the display. During the off state, the content will be updated according to the latest values or states. |
Special characters
Name | Character | Code (generic) | Code (html) | Code (verbose) | Extra information |
---|---|---|---|---|---|
Degree | ˚ | {D} | ° | degreeC degree_C |
"degreeC" and "degree_C" will give you ˚C |
Angle quotes (L/R) | « » |
{<<} {>>} |
« » |
- | - |
Greek mu | µ | {u} | µ | - | - |
Currency | € ¥ £ ¢ |
{E} {Y} {P} {c} |
€ ¥ £ ¢ |
- | - |
Math symbols | x¹ x² x³ ¼ ½ ¾ ± × ÷ |
{^1} {^2} {^3} {1_4} {1_2} {3_4} {+-} {x} {..} |
¹ ² ³ ¼ ½ ¾ ± × ÷ |
- | - |