2021-01-04 19:51:51 +01:00
|
|
|
ST7735 Display
|
|
|
|
==============
|
|
|
|
|
|
|
|
.. seo::
|
|
|
|
:description: Instructions for setting up a ST7735 display drivers.
|
|
|
|
:keywords: ST7735
|
2021-11-16 03:19:33 +01:00
|
|
|
:image: st7735.jpg
|
2021-01-04 19:51:51 +01:00
|
|
|
|
2021-02-20 22:02:46 +01:00
|
|
|
ST7735 Display Driver.
|
2021-01-04 19:51:51 +01:00
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
The ST7735 component allows you to use a ST7735 display
|
|
|
|
(`datasheet and information <https://learn.adafruit.com/1-8-tft-display/downloads>`__,
|
|
|
|
`Adafruit <https://www.adafruit.com/product/358>`__) in ESPHome.
|
|
|
|
It uses the :ref:`SPI Bus <spi>` for communication.
|
|
|
|
|
|
|
|
.. figure:: images/st7735.jpg
|
|
|
|
:align: center
|
|
|
|
:width: 75.0%
|
|
|
|
|
|
|
|
ST7735 Display
|
|
|
|
|
|
|
|
There are numerous board types out there. Some initialize differently as well. This driver will take a few options to narrow down the right settings.
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
display:
|
2021-02-14 00:50:11 +01:00
|
|
|
- platform: st7735
|
|
|
|
model: "INITR_18BLACKTAB"
|
|
|
|
reset_pin: D4
|
|
|
|
cs_pin: D1
|
2021-03-22 05:13:27 +01:00
|
|
|
dc_pin: D2
|
2021-02-14 00:50:11 +01:00
|
|
|
rotation: 0
|
2021-05-11 14:40:52 +02:00
|
|
|
device_width: 128
|
|
|
|
device_height: 160
|
|
|
|
col_start: 0
|
|
|
|
row_start: 0
|
2021-08-03 09:48:45 +02:00
|
|
|
eight_bit_color: true
|
2021-02-14 00:50:11 +01:00
|
|
|
update_interval: 5s
|
2021-01-04 19:51:51 +01:00
|
|
|
|
|
|
|
Configuration variables:
|
2021-03-11 19:31:31 +01:00
|
|
|
************************
|
2021-01-04 19:51:51 +01:00
|
|
|
|
2021-11-28 19:57:01 +01:00
|
|
|
- **model** (**Required**, string): The model to use, one of the following options:
|
|
|
|
|
|
|
|
- ``INITR_BLACKTAB``
|
|
|
|
- ``INITR_GREENTAB``
|
|
|
|
- ``INITR_REDTAB``
|
|
|
|
- ``INITR_MINI160X80``
|
|
|
|
- ``INITR_18BLACKTAB``
|
|
|
|
- ``INITR_18REDTAB``
|
|
|
|
|
2021-02-20 22:02:46 +01:00
|
|
|
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The CS pin.
|
|
|
|
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
|
2021-02-14 06:22:12 +01:00
|
|
|
- **device_width** (**Required**, int): The device width. 128 is default
|
|
|
|
- **device_height** (**Required**, int): The device height. 160 is default
|
2021-09-16 01:40:27 +02:00
|
|
|
- **col_start** (**Required**, int): The starting column offset. Default value depends on **model**.
|
|
|
|
- **row_start** (**Required**, int): The starting row offset. Default value depends on **model**.
|
2021-11-28 19:57:01 +01:00
|
|
|
- **use_bgr** (*Optional*, boolean): Use BGR mode. Default is false.
|
|
|
|
- **invert_colors** (*Optional*, boolean): Invert LCD colors. Default is false.
|
|
|
|
- **eight_bit_color** (*Optional*, boolean): 8bit mode. Default is false. This saves 50% of the buffer required for the display.
|
2021-02-20 22:02:46 +01:00
|
|
|
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
|
2021-12-29 06:50:13 +01:00
|
|
|
- **update_interval** (*Optional*, :ref:`config-time`): time between display updates.
|
2021-01-04 19:51:51 +01:00
|
|
|
|
|
|
|
Memory notes:
|
2021-03-11 19:31:31 +01:00
|
|
|
*************
|
2021-01-04 19:51:51 +01:00
|
|
|
|
|
|
|
- 8Bit color saves 50% of the buffer required.
|
2021-07-28 23:56:11 +02:00
|
|
|
- ``eight_bit_color: true`` 160x128 = 20480 *Important for memory constrained devices*
|
|
|
|
- ``eight_bit_color: false`` 160x128x2 = 40960
|
2021-01-04 19:51:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
Models:
|
2021-03-11 19:31:31 +01:00
|
|
|
*******
|
2021-01-04 19:51:51 +01:00
|
|
|
|
|
|
|
- INITR_GREENTAB
|
|
|
|
- INITR_REDTAB
|
|
|
|
- INITR_BLACKTAB
|
2021-02-24 08:47:45 +01:00
|
|
|
- INITR_MINI160X80
|
2021-01-04 19:51:51 +01:00
|
|
|
- INITR_18BLACKTAB
|
|
|
|
- INITR_18REDTAB
|
|
|
|
|
|
|
|
|
|
|
|
See Also
|
|
|
|
--------
|
|
|
|
|
|
|
|
- :ref:`spi`
|
2021-06-20 22:25:19 +02:00
|
|
|
- :doc:`/components/display/index`
|
2021-01-04 19:51:51 +01:00
|
|
|
- :apiref:`st7735/st7735.h`
|
|
|
|
- :ghedit:`Edit`
|