Trying to get the Adafruit TFT Featherwing to work with @loboris ESP32 code

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
slzatz
Posts: 92
Joined: Mon Feb 09, 2015 1:09 am

Trying to get the Adafruit TFT Featherwing to work with @loboris ESP32 code

Post by slzatz » Sat Sep 30, 2017 6:55 pm

I am trying to use @loboris micropython code https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo, which according to the documentation has been tested with several TFTs but I have been unable to get the Adafruit Feather ESP32 and TFT Featherwing combo to work and get no response from the TFT at all. The TFT switch is on and the screen is lit (or at least backlit) but it does not respond to any drawing commands. I have tried a couple of ESP32 feathers and TFT featherwing combos and I know the TFTs work since they work with the Adafruit ESP8266 Feather. If anyone has the Feather ESP32 and the TFT Featherwing and loads the latest software from the github repository linked to above (you'll have to compile it) can you let me know if you can get the screen to respond -- that would be beyond helpful since I am really stuck at this point trying to figure out what to do and would like to know if the problem is mine or something about the Adafruit ESP 32 Feather/TFT combo. The following code should work but doesn't for me:

Code: Select all

import display
tft = display.TFT()
tft.init(tft.ILI9341, miso=19, mosi=18, clk=5, cs=15, dc=33, bgr=True)
I don't get an error or any indication that there is a problem but the screen simply doesn't respond in any way.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Trying to get the Adafruit TFT Featherwing to work with @loboris ESP32 code

Post by deshipu » Sat Sep 30, 2017 10:21 pm

Perhaps the SPI speed is too large? Have you tried at a slower clock speed?

slzatz
Posts: 92
Joined: Mon Feb 09, 2015 1:09 am

Re: Trying to get the Adafruit TFT Featherwing to work with @loboris ESP32 code

Post by slzatz » Sat Sep 30, 2017 11:25 pm

Perhaps the SPI speed is too large? Have you tried at a slower clock speed?
Thanks for the suggestion - I was wondering that too. I have tried a variety of clock speeds and it hasn't made a difference.

slzatz
Posts: 92
Joined: Mon Feb 09, 2015 1:09 am

Re: Trying to get the Adafruit TFT Featherwing to work with @loboris ESP32 code

Post by slzatz » Sat Oct 07, 2017 7:31 am

A bit of progress. I haven't yet gotten the ESP32 feather/TFT featherwing combo to work with the @loboris display driver but I can get the TFT to respond using your (@deshipu) ili9341 driver located here: https://github.com/adafruit/micropython ... gb-display. So the following code works on the @loboris port using your driver:

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
Steve

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: Trying to get the Adafruit TFT Featherwing to work with @loboris ESP32 code

Post by loboris » Sun Oct 08, 2017 10:13 am

Fixed, see this.

slzatz
Posts: 92
Joined: Mon Feb 09, 2015 1:09 am

Re: Trying to get the Adafruit TFT Featherwing to work with @loboris ESP32 code

Post by slzatz » Sun Oct 08, 2017 2:04 pm

Works perfectly now -- speed of drawing is really impressive. @loboris - thanks for your work on this.

Post Reply