mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-14 10:35:27 +01:00
Merge branch 'current' into next
This commit is contained in:
commit
d359330651
@ -67,6 +67,8 @@ beyond the basic SPI connections, and a reasonable amount of RAM, it is not well
|
|||||||
Configuration variables:
|
Configuration variables:
|
||||||
************************
|
************************
|
||||||
|
|
||||||
|
All :ref:`graphical display configuration<display-configuration>` options are available, plus the following.
|
||||||
|
|
||||||
- **model** (**Required**): The model of the display. Options are:
|
- **model** (**Required**): The model of the display. Options are:
|
||||||
|
|
||||||
- ``M5STACK``, ``TFT 2.4``, ``TFT 2.4R``, ``S3BOX``, ``S3BOX_LITE``, ``WSPICOLCD``
|
- ``M5STACK``, ``TFT 2.4``, ``TFT 2.4R``, ``S3BOX``, ``S3BOX_LITE``, ``WSPICOLCD``
|
||||||
@ -78,13 +80,15 @@ Configuration variables:
|
|||||||
|
|
||||||
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
|
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
|
||||||
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
|
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
|
||||||
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
|
- **cs_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The CS pin.
|
||||||
See :ref:`display-engine` for more information.
|
|
||||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
|
|
||||||
- **auto_clear_enabled** (*Optional*, boolean): Whether to automatically clear the display in each loop (''true'', default),
|
.. note::
|
||||||
or to keep the existing display content (must overwrite explicitly, e.g., only on data change).
|
|
||||||
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
|
A DC pin is always required, the CS pin and RESET pin will only be needed if the specific board has those
|
||||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
pins wired to GPIOs.
|
||||||
|
|
||||||
|
|
||||||
- **color_palette** (*Optional*): The type of color pallet that will be used in the ESP's internal 8-bits-per-pixel buffer. This can be used to improve color depth quality of the image. For example if you know that the display will only be showing grayscale images, the clarity of the display can be improved by targeting the available colors to monochrome only. Options are:
|
- **color_palette** (*Optional*): The type of color pallet that will be used in the ESP's internal 8-bits-per-pixel buffer. This can be used to improve color depth quality of the image. For example if you know that the display will only be showing grayscale images, the clarity of the display can be improved by targeting the available colors to monochrome only. Options are:
|
||||||
|
|
||||||
- ``NONE`` (default)
|
- ``NONE`` (default)
|
||||||
|
@ -11,15 +11,34 @@ engine. Fundamentally, there are these types of displays:
|
|||||||
- Character displays like :doc:`7-Segment displays <max7219>` or
|
- Character displays like :doc:`7-Segment displays <max7219>` or
|
||||||
:doc:`LCD displays <lcd_display>`.
|
:doc:`LCD displays <lcd_display>`.
|
||||||
- Serial displays like :doc:`nextion` that have their own processors for graphics rendering.
|
- Serial displays like :doc:`nextion` that have their own processors for graphics rendering.
|
||||||
- Graphical binary displays which can toggle ON/OFF any pixel, like :doc:`E-Paper <waveshare_epaper>`,
|
- Graphical displays with fully addressable pixels, like :doc:`E-Paper <waveshare_epaper>`,
|
||||||
|
|
||||||
:doc:`OLED <ssd1306>` or :doc:`TFT <ili9xxx>` displays.
|
:doc:`OLED <ssd1306>` or :doc:`TFT <ili9xxx>` displays.
|
||||||
|
|
||||||
For graphical displays, which offer the greatest flexibility, there are two options:
|
For graphical displays, which offer the greatest flexibility, there are two options for displaying content:
|
||||||
|
|
||||||
- ESPHome's :ref:`own rendering engine <display-engine>`
|
- ESPHome's :ref:`own rendering engine <display-engine>`
|
||||||
- :doc:`LVGL </components/lvgl/index>` - Light and Versatile Graphics Library
|
- :doc:`LVGL </components/lvgl/index>` - Light and Versatile Graphics Library
|
||||||
|
|
||||||
|
.. _display-configuration:
|
||||||
|
|
||||||
|
Configuration variables:
|
||||||
|
************************
|
||||||
|
|
||||||
|
All display components inherit these configuration variables.
|
||||||
|
|
||||||
|
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Required if there are multiple displays.
|
||||||
|
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``1s``.
|
||||||
|
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
|
||||||
|
See :ref:`display-engine` for more information.
|
||||||
|
|
||||||
|
All *graphical* displays also inherit these configuration variables.
|
||||||
|
|
||||||
|
- **auto_clear_enabled** (*Optional*, boolean): If the display should be cleared before each update. Defaults to ``true``.
|
||||||
|
- **show_test_card** (*Optional*, boolean): If the display should show a test card. Defaults to ``false``. If set, any code in the ``lambda`` config option will be ignored.
|
||||||
|
- **rotation** (*Optional*, integer): The rotation of the display in degrees, one of 0, 90, 180 or 270. Defaults to ``0``.
|
||||||
|
- **pages** (*Optional*, list): Pages configuration - see below.
|
||||||
|
|
||||||
|
|
||||||
.. _display-engine:
|
.. _display-engine:
|
||||||
|
|
||||||
Display Rendering Engine
|
Display Rendering Engine
|
||||||
|
@ -37,12 +37,12 @@ ESP-IDF. PSRAM is a requirement due to the size of the display buffer.
|
|||||||
dimensions:
|
dimensions:
|
||||||
width: 480
|
width: 480
|
||||||
height: 480
|
height: 480
|
||||||
cs_pin: REPLACE_ME
|
cs_pin: GPIOXX
|
||||||
reset_pin: REPLACE_ME
|
reset_pin: GPIOXX
|
||||||
de_pin: REPLACE_ME
|
de_pin: GPIOXX
|
||||||
hsync_pin: REPLACE_ME
|
hsync_pin: GPIOXX
|
||||||
vsync_pin: REPLACE_ME
|
vsync_pin: GPIOXX
|
||||||
pclk_pin: REPLACE_ME
|
pclk_pin: GPIOXX
|
||||||
# Replace XX with the correct pin number
|
# Replace XX with the correct pin number
|
||||||
|
|
||||||
data_pins:
|
data_pins:
|
||||||
@ -109,18 +109,13 @@ Configuration variables:
|
|||||||
- **rotation** (*Optional*): Rotate the display presentation in software. Choose one of ``0°``, ``90°``, ``180°``, or ``270°``. This option cannot be used with ``transform``.
|
- **rotation** (*Optional*): Rotate the display presentation in software. Choose one of ``0°``, ``90°``, ``180°``, or ``270°``. This option cannot be used with ``transform``.
|
||||||
- **transform** (*Optional*): Transform the display presentation using hardware. All defaults are ``false``. This option cannot be used with ``rotation``.
|
- **transform** (*Optional*): Transform the display presentation using hardware. All defaults are ``false``. This option cannot be used with ``rotation``.
|
||||||
|
|
||||||
- **swap_xy** (*Optional*, boolean): If true, exchange the x and y axes.
|
|
||||||
- **mirror_x** (*Optional*, boolean): If true, mirror the x axis.
|
- **mirror_x** (*Optional*, boolean): If true, mirror the x axis.
|
||||||
- **mirror_y** (*Optional*, boolean): If true, mirror the y axis.
|
- **mirror_y** (*Optional*, boolean): If true, mirror the y axis.
|
||||||
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
|
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
|
||||||
See :ref:`display-engine` for more information.
|
See :ref:`display-engine` for more information.
|
||||||
|
|
||||||
|
|
||||||
**Note:** To rotate the display in hardware use one of the following combinations:
|
**Note:** To rotate the display in hardware by 180 degrees set both ``mirror_x`` and ``mirror_y`` to ``true``. The st7701s does not support hardware rotation by 90 or 270.
|
||||||
|
|
||||||
- 90 degrees - use ``swap_xy`` with ``mirror_x``
|
|
||||||
- 180 degrees - use ``mirror_x`` with ``mirror_y``
|
|
||||||
- 270 degrees - use ``swap_xy`` with ``mirror_y``
|
|
||||||
|
|
||||||
The horizontal and vertical ``pulse_width``, ``front_porch`` and ``back_porch`` values are optional, but may require
|
The horizontal and vertical ``pulse_width``, ``front_porch`` and ``back_porch`` values are optional, but may require
|
||||||
changing for a specific display. Refer to the manufacturer's sample code for suitable values. These specify timing
|
changing for a specific display. Refer to the manufacturer's sample code for suitable values. These specify timing
|
||||||
|
Loading…
Reference in New Issue
Block a user