We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7d76815 + 6d1a8f4 commit 1f51803Copy full SHA for 1f51803
1 file changed
Pi_Hole_Ad_Blocker/stats.py
@@ -49,6 +49,11 @@
49
# to the right size for your display!
50
disp = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c)
51
52
+# Leaving the OLED on for a long period of time can damage it
53
+# Set these to prevent OLED burn in
54
+DISPLAY_ON = 10 # on time in seconds
55
+DISPLAY_OFF = 50 # off time in seconds
56
+
57
# Clear display.
58
disp.fill(0)
59
disp.show()
@@ -125,4 +130,7 @@
125
130
# Display image.
126
131
disp.image(image)
127
132
128
- time.sleep(.1)
133
+ time.sleep(DISPLAY_ON)
134
+ disp.fill(0)
135
+ disp.show()
136
+ time.sleep(DISPLAY_OFF)
0 commit comments