Skip to content

Commit d62b1df

Browse files
committed
Added code to turn on backlight for Mini PiTFT Stats
1 parent b17fd2b commit d62b1df

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/rgb_display_minipitftstats.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
# Some other nice fonts to try: http://www.dafont.com/bitmap.php
5151
font = ImageFont.truetype('/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf', 24)
5252

53+
# Turn on the backlight
54+
backlight = digitalio.DigitalInOut(board.D22)
55+
backlight.switch_to_output()
56+
backlight.value = True
57+
5358
while True:
5459
# Draw a black filled box to clear the image.
5560
draw.rectangle((0, 0, width, height), outline=0, fill=0)

0 commit comments

Comments
 (0)