Comments (11)
on_...:
then:
- lvgl.pause:
show_snow: true
Will fill the screen with random pixels until LVGL is unpaused.
Would probably want to also dim the backlight.
from esphome.
to just show the snow for a certain amount of time and white out after that
Just use the same mechanism as used to enter the paused state, e.g. in my L8:
time:
- platform: sntp
id: esptime
timezone: Australia/Sydney
on_time:
- seconds: 0
minutes: 30
hours: 0
then:
- lvgl.pause:
show_snow: true
on_time:
- seconds: 0
minutes: 30
hours: 2
then:
- lvgl.resume:
Combined with resume on touch, just in case I'm having a post-midnight snack:
touchscreen:
- platform: ....
id: my_touchscreen
on_release:
then:
- if:
condition: lvgl.is_paused
then:
- lvgl.resume:
CPU time etc used is not significant - it only updates one row of pixels per loop() interval, so likely running at 5% utilisation.
from esphome.
This is very easy to do now:
esphome:
on_boot:
priority: 10
then:
- script.execute: my_script
touchscreen:
- platform: ...
...
on_touch:
then:
- script.execute: my_script
# Define a PWM output on the ESP32
output:
- platform: ledc
pin: 16
id: gpio_17_backlight_pwm
# Define a monochromatic, dimmable light for the backlight
light:
- platform: monochromatic
output: gpio_17_backlight_pwm
name: Backlight
id: back_light
restore_mode: ALWAYS_OFF
script:
- id: my_script
mode: restart
then:
- light.turn_on: back_light
- lvgl.resume
- delay: 10min
- light.turn_off: back_light
- lvgl.pause
from esphome.
How does that draw random RGB pixels?
from esphome.
Not sure how complicated would be to extend this with something like
show_snow:
time: 600s
end_color: 0xFFFFFF
to just show the snow for a certain amount of time and white out after that. A daily cycle of 10-15 minutes of snow is enough to train the pixels, not sure if this causes some CPU/BUS stress, power increase or not, might be worth having an option to stop after a while.
from esphome.
I think that the option to turn off the screen after some small time prevent the screen from burning in, is it not?
from esphome.
I think that the option to turn off the screen after some small time prevent the screen from burning in, is it not?
Not. For these panels, when you "turn off" the screen, in reality you just turn off the backlight. The pixels in the LCD panel layer are still showing the picture, you just don't see it because it's not being lit. Burn in happens at pixel level, it's independent of backlight (more influenced by ambient temperature).
Read
HASwitchPlate/openHASP#134 (comment) for more details.
from esphome.
Inspected pixels a bit closer:
It looks like a randomization happens among 256 colors.
From pixel traning point of view, given that each pixel is composed of a Red, a Green and a Blue physical layer it would be more effective if we would randomize only these colors. Electronically that would mean that for example for Red pixel, Red layer is fully open, Green and blue are fully closed. Physically that would be more intense, as each pixel of each layer has to go in fully open and fully closed state at random times. Any other color means just partial opened levels of all the layers. Of course plain R, G, B is likely to occur statistically with 256 color randomization, but it's less effective.
I'd suggest to just randomize the pixels between plain R, G and B (or just R,G,B,White,Black).
from esphome.
It looks like a randomization happens among 256 colors.
65536 colours actually.
Just white and black would drive all pixels from one extreme to another. But it wouldn't look as nice :-) And generating random numbers is easier than generating specific colours.
There is very little information I can find on what really happens with LCD burn-in, and what's the best strategy to avoid it - much of the discussion is somewhere between theory and speculation, so I don't think it's worth spending more time on for an unquantifiable benefit.
from esphome.
somewhere between theory and speculation
I guess you didn't run into cases like this (see photos):
HASwitchPlate/openHASP#311
Not talking about oleds, which are very prone to burn-in (but at least for them indeed it's enough to just black out/turn off the screen)
from esphome.
guess you didn't run into cases like this (see photos):
Just really reinforces my observations so far - the problem exists, in some LCDs at least, but nobody has any hard data on how to deal with it.
antiburn doesn't make any notisable difference. Even after repeated runs.
Only time seems to have a positive effect on this ghosting effect.
Left my screen on as test with uniform background (#008080) and after some 30 minutes ghosting has faded to be almost invisible.
from esphome.
Related Issues (20)
- Custom component/code integration for pages, widgets, etc. HOT 6
- Lvgl on e-paper crash (TTGO T5_V2.3_2.13) HOT 2
- Compile error in LVGL after last commit. HOT 6
- FR: `udp` sensor from multiple providers
- FR: `udp` text sensor
- FR: `udp` arbitrary data with actions and triggers HOT 1
- FR: `udp` repeat messages
- Page's `skip` option to be set at runtime
- `obj` not clipping children HOT 4
- Currently active page variable or sensor HOT 5
- Lambdas for widgets states/flags HOT 1
- `lvgl.is_idle` condition, timeout required HOT 7
- LVGL sensors HOT 1
- `transform_angle`, `transform_zoom` failure
- Font kerning HOT 1
- Formatted text for widget updates HOT 1
- QR code
- Graph as image HOT 2
- VNC: host binary crashes on client disconnect
- VNC and `graphical_display_menu` don't play nicely together HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esphome.