open-lv / air-guard

Do-it-yourself electronics kit for building an air quality monitor for your school, work and home.
https://gaisasargs.lv
MIT License
7 stars 3 forks source link

Reduce OLED contrast on init #25

Closed skrubis closed 2 years ago

skrubis commented 2 years ago

Due to incredible amounts of burn in caused by the somewhat static main screen of platformio fw running for maybe a day- please reduce the OLED contrast to a somewhat useable minimum on init

i2c_command(0x81); // SSD1306_SETCONTRAST
festlv commented 2 years ago

It seems to me that u8g2 library sets the contrast to maximum on startup.

badge.team's ssd1306 driver sets the contrast to 207 (range: 0-255). I would guess that this value is somewhat validated by badges, however, the real effect of this register's value also depends on bias resistor, which may differ (as the badges typically are using OLED directly, without the carrier board): https://forums.adafruit.com/viewtopic.php?t=38569#p573606

festlv commented 2 years ago

After my screen was frozen for a day, it did experience burn-in with the previous contrast value (0xcf). Reduced to 0x33 in https://github.com/open-lv/micropython/tree/0.0.8