|
发表于 2021-9-21 12:54:16
|
显示全部楼层
本帖最后由 dscao 于 2021-9-21 12:57 编辑
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:
# ... ssd1306默认是: update_interval ( Optional, Time): The interval to re-draw the screen. Defaults to 5s.
这个默认60s
update_interval: 1s 这些设置成不起作用吗?没用过这款,只用过ssd1306,而且也没使用秒显示。不看文档也没注意这些。
|
|