Skip to content

Commit 9e71591

Browse files
authored
Merge pull request #44 from makermelissa/master
Added code to turn on backlight for Mini PiTFT Stats
2 parents b17fd2b + d62b1df commit 9e71591

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/rgb_display_minipitftstats.py

+5
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)