Updated Displays (markdown)

Michael Ingraham 2019-08-21 12:30:27 -04:00
parent 4ebf9657d4
commit eb546a7790
1 changed files with 24 additions and 21 deletions

@ -8,7 +8,7 @@ All display commands:
<a id="DisplayAddress"> </a> DisplayAddress | `0..255` = set display module address
<a id="DisplayDimmer"> </a> DisplayDimmer | `0` = switch the display off<BR> `1..100` = switch the display on<BR>`0..100` = set display luminosity *(only on 8x8 Dot-Matrix displays)*
<a id="DisplayMode"> </a> DisplayMode | `0..5` = set to display [predefined content](#displaymode-parameters) according to display type
<a id="DisplayModel"> </a> DisplayModel | Set model of your display:<BR>`1` = [I2C LCD Display](https://learn.adafruit.com/i2c-spi-lcd-backpack) (default addresses `0x27`, `0x3F`)<BR>`2` = [SSD1306](https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples) OLED 128x32/128x64 (default i2c addresses `0x3C`, `0x3D`)<BR>`3` = [HT16K33](https://www.adafruit.com/product/1427) 8x8 Dot-Matrix<BR>`4` = [ILI9341](https://www.adafruit.com/product/1770) TFT LCD<BR>`5` = [2.9 inch E-Paper Display](https://www.waveshare.com/wiki/2.9inch_e-Paper_Module) 296x128 (software 3 wire SPI)<BR>`6` = [4.2 inch E-Paper Display](https://www.waveshare.com/wiki/4.2inch_e-Paper_Module) 400x300 (software 3 wire SPI)<BR>`7` = [SH1106](https://www.ebay.de/itm/1-3-OLED-Display-Weis-SH1106-128x64-I2C-Modul-Arduino-Raspberry-Pi/162572755829?hash=item25da176375:g:hdgAAOSwQKZdQZ10) OLED 128x64 (default i2c address `0x3c`)<BR>`8` = [ILI9488](https://www.buydisplay.com/default/lcd-3-5-inch-320x480-tft-display-module-optl-touch-screen-w-breakout-board) TFT 480x320 (capacitive touch, hardware 3 wire SPI)<BR>`9` = [SSD1351](https://www.ebay.de/itm/1-5-128x128-OLED-Display-Modul-RGB-SPI-Interface-Arduino-Raspberry-Pi/123256209315?hash=item1cb2a47fa3:g:WtsAAOSwZb5bTfjF) color OLED 128x128 (hardware 3 wire SPI)<BR>`10` = [RA8867](https://www.buydisplay.com/default/spi-7-inch-tft-lcd-dislay-module-1024x600-ra8876-optl-touch-screen-panel) TFT LCD 1024x600 (capacitive touch, hardware 4 wire SPI)
<a id="DisplayModel"> </a> DisplayModel | Set model of your display:<BR>`1` = [I2C LCD Display](https://learn.adafruit.com/i2c-spi-lcd-backpack) (default addresses `0x27`, `0x3F`)<BR>`2` = [SSD1306](https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples) OLED 128x32/128x64 (default i2c addresses `0x3C`, `0x3D`)<BR>`3` = [HT16K33](https://www.adafruit.com/product/1427) 8x8 Dot-Matrix<BR>`4` = [ILI9341](https://www.adafruit.com/product/1770) TFT LCD<BR>`5` = [2.9 inch E-Paper Display](https://www.waveshare.com/wiki/2.9inch_e-Paper_Module) 296x128 (software 3-wire SPI)<BR>`6` = [4.2 inch E-Paper Display](https://www.waveshare.com/wiki/4.2inch_e-Paper_Module) 400x300 (software 3-wire SPI)<BR>`7` = [SH1106](https://www.ebay.de/itm/1-3-OLED-Display-Weis-SH1106-128x64-I2C-Modul-Arduino-Raspberry-Pi/162572755829?hash=item25da176375:g:hdgAAOSwQKZdQZ10) OLED 128x64 (default i2c address `0x3c`)<BR>`8` = [ILI9488](https://www.buydisplay.com/default/lcd-3-5-inch-320x480-tft-display-module-optl-touch-screen-w-breakout-board) TFT 480x320 (capacitive touch, hardware 3-wire SPI)<BR>`9` = [SSD1351](https://www.ebay.de/itm/1-5-128x128-OLED-Display-Modul-RGB-SPI-Interface-Arduino-Raspberry-Pi/123256209315?hash=item1cb2a47fa3:g:WtsAAOSwZb5bTfjF) color OLED 128x128 (hardware 3-wire SPI)<BR>`10` = [RA8867](https://www.buydisplay.com/default/spi-7-inch-tft-lcd-dislay-module-1024x600-ra8876-optl-touch-screen-panel) TFT LCD 1024x600 (capacitive touch, hardware 4-wire SPI)
<a id="DisplayRefresh"> </a> DisplayRefresh | `1..7` = set time in seconds to update predefined content when using `DisplayMode` &ne; `0`
<a id="DisplaySize"> </a> DisplaySize | `1..4` = set display scale-up size (only for `DisplayModel 2` (SSD1306 OLED) and `DisplayModel 4` (ILI9341 TFT LCD))
<a id="DisplayRotate"> </a> DisplayRotate | Set rotation angle<BR> `0` = 0°<BR> `1` = 90°<BR> `2` = 180°<BR> `3` = 270°
@ -51,7 +51,7 @@ USE_DISPLAY_RA8876 | enables TFT RA8876 display need also USE_SPI
USE_TOUCH_BUTTONS | enable virtual touch button support with touch displays
SHOW_SPLASH | enable init message on display
USE_AWATCH | enables support analog watch
USE_GRAPH | enable line charts also define e.g. `#define NUM_GRAPHS 4`
USE_GRAPH | enable line charts also define, e.g., `#define NUM_GRAPHS 4`
# DisplayText Use
@ -116,8 +116,9 @@ align right
`Pfilename:` = display an rgb 16bit color image when sdcard file system is present
### Touch Buttons
(`#define USE_TOUCH_BUTTONS`)
Draw up to 16 GFX buttons to switch real Tasmota devices such as relays. (`#define USE_TOUCH_BUTTONS`)
Draw up to 16 GFX buttons to switch real Tasmota devices such as relays.
- Button number + 256 - a virtual touch toggle button is created (MQTT => TBT)
- Button number + 512 - a virtual touch push button is created (MQTT => PBT)
@ -136,33 +137,35 @@ text: = button text (must end with a colon :) (max 9 chars)
### Line chart
(`#define USE_GRAPH` and `#define NUM_GRAPHS 4` - maximum of 16)
Up to 4 line charts may be defined. Ticks may be defined by adding
tick numbers to the 1. parameter n like this =\> n = graph number
(0-3) + x ticks (16\*number of x ticks) + y ticks (1024\*number of y
ticks) (`#define USE_GRAPH` `#define NUM_GRAPHS 4 (16 max)`)
parameters, separated by colons
Up to 4 line charts may be defined.
Ticks may be defined by adding tick numbers to the `n` parameter.
&nbsp;&nbsp;&nbsp;&nbsp;For example: `n` = graph number (0..3) + x ticks (16\*number of x ticks) + y ticks (1024\*number of y ticks).
Parameters are separated by colons.
>*Gn:xp:yp:xs:ys:t:fmax:fmin* = defines a line chart.
n = number up to 4 charts (0-3) + optional ticks
n = number up to 4 charts (0..3) + optional ticks
xp = x position
yp = y position
xs = x size (if xs<0) graph is not reinitialized on second call (e.g. restart of scripter)
xs = x size (if xs<0) graph is not reinitialized on second call (e.g., restart of scripter)
ys = y size
t = time in minutes for total chart
ymin = float chart minimum y
ymax = float chart maximum y
icol = line indexcolor (only for color graphs)
icol = line color index (only for color graphs)
>gn:v Adds a value to the chart buffer
n = number up to 4 charts (0-3)
n = number up to 4 charts (0..3)
v = float value to add
>Gdn:m = set graph n draw mode 0=off, 1=on when on, redraw graph
Gsn:path: = save graph n to path (if optional sdcard present)
Grn:path: = restore graph n from path (if optional sdcard present)
>Gdn:m = set graph n draw mode `0` = off, `1` = on. When on, redraw graph
Gsn:path: = save graph `n` to path (if optional SD card is present)
Grn:path: = restore graph `n` from path (if optional SD card is present)
### Index colors
### Color Indices
Selected with `Ci` and `Bi` in the ILI9488, SSD1351, and RA8876 color panels
@ -181,9 +184,9 @@ Selected with `Ci` and `Bi` in the ILI9488, SSD1351, and RA8876 color panels
E-Paper displays have 2 operating modes: full update and partial update.
While full update delivers a clean and sharp picture it has the disadvantage of taking several seconds for the screen update and shows severe flickering during update.
Partial update is quite fast (300 ms) with no flickering but there is the possibility that erased content is still slightly visible.
To "whiten" the display it is therefore useful to perform a full update in regular intervals (e.g each hour).
To refresh the display it is therefore useful to perform a full update in regular intervals (e.g each hour).
Compilation \#defines => `USE_SPI`, `USE_DISPLAY`, `USE_DISPLAY_EPAPER29`, or `USE_DISPLAY_EPAPER42`
Compilation directives: `#define USE_SPI`, `#define USE_DISPLAY`, `#define USE_DISPLAY_EPAPER29`, or `#define USE_DISPLAY_EPAPER42`
Remark: the 4.2 epaper requires about 15k of RAM. Therefore it only works with Core 2.42 and above
@ -204,7 +207,7 @@ EPDFont:
![EPDFont](https://user-images.githubusercontent.com/11647075/63440222-be7ed180-c42f-11e9-9be3-2f446fc28037.jpg)
## Hardware Connections
I<sup>2</sup>C displays are connected in the usual manner and defined via Tasmota pin selection.
I<sup>2</sup>C displays are connected in the usual manner and defined via the GPIO component selection.
The I<sup>2</sup>C address must be specified using `DisplayAddress XX`, e.g., `60`. The model must be spedified with `DisplayModel`, e.g., `2` for SSD1306. To permanently turn the display on set `DisplayDimmer 100`. Display rotation can be permanently set using `DisplayRotate X` (x = `0..3`).
@ -223,7 +226,7 @@ Print Text at size 1 on line 1, column 1:
Draw a rectangle and draw text inside with size 2 and 7 chars padded with spaces:
`DisplayText [x85y95h130v30h-130v-30s2p7x90y100]37.25 C`
Clear screen:
Refresh screen:
`DisplayText [z]`
Draw rectangle from x,y with width and height:
@ -232,7 +235,7 @@ Draw rectangle from x,y with width and height:
### Display local sensors
_(line breaks and indentation added to the rules for readability)_
Use Tasmota rules to display sensor values, time, and a separation line. Clear the display every 60 minutes :
Use Tasmota rules to display sensor values, time, and a separation line. Refresh the display every 60 minutes:
```
rule1 on tele-SHT3X-0x44#Temperature do DisplayText [f1p7x0y5]%value% C endon
on tele-SHT3X-0x44#Humidity do DisplayText [f1p10x70y5]%value% %[x0y20h296x250y5t] endon