1.3" Color LCD Display "shield" for Raspberry Pi Pico

From Embedded Workshop
Jump to navigation Jump to search

Recently, after seeing a color 1.3" display, joystick, and four buttons, all on a Raspberry Pi Pico "shield" module, I had to buy it.
https://www.ebay.com/itm/184820464847
This board looks like the perfect solution to make a video game to run on the Pico.

https://www.ebay.com/itm/184820464847


https://www.ebay.com/itm/184820464847


The Ebay website didn't offer any libraries, but it did provide a wiring diragram
Since the module was documented to use an SST7789 for the 240x240 display, it was rather easy to find a MicroPython library for it, st7789py_mpy-master.zip.
Included with the library are several example programs, including ttgo_lines.py.

For the ttgo_lines.py program to function with the display, the gpio pins need to be changed for the Pico as follows:

def main():
   spi = SoftSPI(
       baudrate=20000000,
       polarity=1,
       phase=0,
       sck=Pin(10), # previously 18
       mosi=Pin(11), # previously 19
       miso=Pin(14)) # previously 13

   tft = st7789.ST7789(
       spi,
       240, # previously 135
       240,
       reset=Pin(12, Pin.OUT), # previously 23
       cs=Pin(9, Pin.OUT), # previously 5
       dc=Pin(8, Pin.OUT), # previously 16
       backlight=Pin(13, Pin.OUT), # previously 4
       rotation=0)


This is a great looking add-on board!