Hello.
How do I write a simple code on the flashing text on the oled display?
Can you advise?
write the data
pause
write blank
pause
write the data
rinse and repeat
thank you for the info. I know this procedure needs to be applied. But I’m not an expert just a beginner. Can you give me an example directly in the code?
well thank you
maybe it will help someone
flashing text when the binary_sensor is ON
binary_sensor:
- platform: gpio
pin:
number: 16
inverted: yes
mode: INPUT_PULLUP
id: blinking
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
update_interval: 500ms
id: lcd
address: 0x3C
lambda: |-
static bool show = false;
if (show || !id(blinking).state)
it.printf(0, 20, id(font2), "TEXT blinking");
show = !show;
constantly flashing text
lambda: |-
static bool show = false;
if (show)
it.printf(30, 20, id(font2), "TEXT blinking");
show = !show;
Flashing icon/text others on display page
//WATER GARDEN
if (id(valve).state) {
static int i = 0;
i++;
if ((i % 2) == 0)
it.printf(50, 0, id(font4), "\U000F058F");
else
it.printf(51, -2, id(font4), "\U000F1481");
}
else {
it.printf(50, 0, id(font4), "\U000F0F93");
}
This is flashing every second.
the question is how can it be accelerated?
change update_interval: 500ms