Skip to content

Instantly share code, notes, and snippets.

@todbot
Created March 28, 2024 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todbot/aa90849ddf987ae903588cdd79468dd1 to your computer and use it in GitHub Desktop.
Save todbot/aa90849ddf987ae903588cdd79468dd1 to your computer and use it in GitHub Desktop.
LilyGo T-Display S3 display hand-setup in CircuitPython
"""
LilyGo T-Display S3 display hand-setup. Not normally required if using https://circuitpython.org/board/lilygo_tdisplay_s3/
"""
import time
import board
import digitalio
import displayio
import paralleldisplaybus
import adafruit_st7789
displayio.release_displays()
lcd_power = digitalio.DigitalInOut(board.LCD_POWER_ON) # IO15
lcd_power.switch_to_output(value=True)
display_bus = paralleldisplaybus.ParallelBus(
# IO39,40,41,42,43,44,45,46,47,48
data_pins = (board.LCD_D0, board.LCD_D1, board.LCD_D2, board.LCD_D3,
board.LCD_D4, board.LCD_D5, board.LCD_D6, board.LCD_D7),
command = board.LCD_DC, # IO7,
chip_select = board.LCD_CS, # IO6,
write = board.LCD_WR, # IO8,
read = board.LCD_RD, # IO9,
reset = board.LCD_RST, # IO5,
frequency = 15_000_000,
)
display = adafruit_st7789.ST7789(display_bus, width=320, height=170, rotation=270, colstart=35)
while True:
print(time.monotonic(), "this is on screen")
time.sleep(0.2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment