Configuration variables:
cs_pin (Required, Pin Schema): Sometimes also called RS. For ST7920 should be inverted.
width (Required, int): The “width” of a screen. Defaults to 128.
height (Required, int): The “height” of a screen. Defaults to 64;
rotation (Optional): Set the rotation of the display. Everything you draw in lambda: will be rotated by this option. One of 0° (default), 90°, 180°, 270°.
lambda (Optional, lambda): The lambda to use for rendering the content on the display. See Display Rendering Engine for more information.
update_interval (Optional, Time): The interval to re-draw the screen. Defaults to 60s.
pages (Optional, list): Show pages instead of a single lambda. See Display Pages.
id (Optional, ID): Manually specify the ID used for code generation.
To use fonts you first have to define a font object in your ESPHome configuration file. Just grab a .ttf file from somewhere on the internet and place it, for example, inside a fonts folder next to your configuration file.
Next, create a font: section in your configuration:
font:
- file: "fonts/Comic Sans MS.ttf"
id: my_font
size: 20
display:
# ...
dscao 发表于 2021-9-21 13:09
看图片,这个引脚很多,屏幕面积也大不少,应该比ssd1306看着舒服一些吧。硬件上与esp32或8266接线方面会比 ...
欢迎光临 『瀚思彼岸』» 智能家居技术论坛 (https://bbs.hassbian.com/) | Powered by Discuz! X3.5 |