Skip to content

Commit 6924c10

Browse files
authored
Merge pull request #28 from tomjn/patch-1
Turn off Backlight when the screen is black/blank
2 parents 3fff6ff + 2b0c8ae commit 6924c10

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/monitor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,10 +1135,11 @@ def handle_button(pin):
11351135
viewcontroller.update()
11361136

11371137
if light_level_low and config.get_general().get("black_screen_when_light_low"):
1138+
display.sleep()
11381139
display.display(image_blank.convert("RGB"))
1139-
11401140
else:
11411141
viewcontroller.render()
1142+
display.wake()
11421143
display.display(image.convert("RGB"))
11431144

11441145
config.set_general(

library/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ python_requires = >= 3
3030
packages = grow
3131
install_requires =
3232
ltr559
33-
st7735
33+
st7735>=0.0.5
3434
pyyaml
3535
fonts
3636
font-roboto

0 commit comments

Comments
 (0)