Code: Select all
import display
tft = display.TFT()
tft.init(tft.ILI9341, miso=19, mosi=18, clk=5, cs=15, dc=33, bgr=True)
Code: Select all
import display
tft = display.TFT()
tft.init(tft.ILI9341, miso=19, mosi=18, clk=5, cs=15, dc=33, bgr=True)
Thanks for the suggestion - I was wondering that too. I have tried a variety of clock speeds and it hasn't made a difference.Perhaps the SPI speed is too large? Have you tried at a slower clock speed?
Code: Select all
>>> import ili9341
>>> from machine import SPI, Pin
>>> spi = SPI(1, sck=5, mosi=18, miso=19, cs=15)
>>> display = ili9341.ILI9341(spi, cs=Pin(15), dc=Pin(33))
>>> display.fill() # clears the screen
>>> display.fill_rectangle(20,20,20,20,ili9341.color565(0xff,0x11, 0x22)) # draws a rectangle