diff --git a/examples/st7789_240x135_simpletest_Pimoroni_Pico_Display_Pack.py b/examples/st7789_240x135_simpletest_Pimoroni_Pico_Display_Pack.py index 3691a31..c4209df 100644 --- a/examples/st7789_240x135_simpletest_Pimoroni_Pico_Display_Pack.py +++ b/examples/st7789_240x135_simpletest_Pimoroni_Pico_Display_Pack.py @@ -1,6 +1,10 @@ # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT +""" +This test will initialize the display using displayio and draw a solid green +background, a smaller purple rectangle, and some yellow text. +""" import board import busio import terminalio @@ -30,12 +34,23 @@ spi_mosi = board.GP19 spi_clk = board.GP18 spi = busio.SPI(spi_clk, spi_mosi) +backlight = board.GP20 display_bus = FourWire(spi, command=tft_dc, chip_select=tft_cs) + display = ST7789( - display_bus, rotation=270, width=240, height=135, rowstart=40, colstart=53 + display_bus, + rotation=270, + width=240, + height=135, + rowstart=40, + colstart=53, + backlight_pin=backlight, ) +# Set the backlight +display.brightness = 0.8 + # Make the display context splash = displayio.Group() display.root_group = splash diff --git a/examples/st7789_320x240_simpletest_Pimoroni_Pico_Display_2_0.py b/examples/st7789_320x240_simpletest_Pimoroni_Pico_Display_2_0.py index 3e8f0e0..9f92b96 100644 --- a/examples/st7789_320x240_simpletest_Pimoroni_Pico_Display_2_0.py +++ b/examples/st7789_320x240_simpletest_Pimoroni_Pico_Display_2_0.py @@ -32,9 +32,16 @@ display_bus = FourWire(spi, command=tft_dc, chip_select=tft_cs) display = ST7789( - display_bus, rotation=270, width=320, height=240, backlight_pin=backlight + display_bus, + rotation=270, + width=320, + height=240, + backlight_pin=backlight, ) +# Set the backlight +display.brightness = 0.8 + # Make the display context splash = displayio.Group() display.root_group = splash