๐ŸŽ„โ›„โ„๏ธ๐ŸŽ It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! ๐ŸŽ„โ›„โ„๏ธ๐ŸŽ
0

Use Feather Huzzah ESP32 with SPI TFT?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Use Feather Huzzah ESP32 with SPI TFT?

by scramma on Tue Oct 08, 2019 3:47 pm

Which library would work to use the Feather Huzzah ESP32 with a generic TFT/Touch display? I have a 3.2" tft that uses MOSI, MISO, SCK, TF_CS, and TL_CS. I have tried to use the "Adafruit_HX8357.h" library, but it won't compile with the Feather.

Thanks for any recommendations.

scramma
 
Posts: 15
Joined: Fri Apr 07, 2017 11:25 am

Re: Use Feather Huzzah ESP32 with SPI TFT?

by dastels on Tue Oct 08, 2019 4:57 pm

I just successfully compiled the HX8357 graphicstest for the ESP32 Feather.

Have you verified that you have the correct board selected? "Adafruit ESP32 Feather".

And please be more specific about what "won't compile" means, specifically. What error(s) are you getting?

Dave

dastels
 
Posts: 745
Joined: Tue Oct 20, 2015 3:22 pm

Re: Use Feather Huzzah ESP32 with SPI TFT?

by scramma on Tue Oct 08, 2019 5:33 pm

Thanks for the reply!

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Adafruit ESP32 Feather, 80MHz, 921600, None"
In file included from C:\Users\Allan\Documents\Arduino\libraries\Adafruit_HX8357_Library\examples\graphicstest\graphicstest.ino:18:0:
C:\Users\Allan\Documents\Arduino\libraries\Adafruit_HX8357_Library/Adafruit_HX8357.h:34:29: fatal error: Adafruit_SPITFT.h: No such file or directory
compilation terminated.
exit status 1
Error compiling for board Adafruit ESP32 Feather.

It's missing Adafruit_SPITFT.h. Isn't that supposed to be part of the Adafruit_GFX library?

Thanks again.

scramma
 
Posts: 15
Joined: Fri Apr 07, 2017 11:25 am

Re: Use Feather Huzzah ESP32 with SPI TFT?

by scramma on Tue Oct 08, 2019 6:21 pm

Here's an update: I installed a newer version of Adafruit_GFX.h (v 1.5.7) and it compiled well. I'm running the graphicstest.ino example, and although I'm getting the serial messages about the graphics that are supposed to be drawing, the display is dark. As mentioned, the tft/touch has these connections:

MOSI, MISO, SCK, T_CS, L_CS and IRQ. I note that that the sketch uses a TFT_DC pin, but as you can see, there is no provision on the display for Data/Command. Is there a way to use the display without that? Thanks again.

scramma
 
Posts: 15
Joined: Fri Apr 07, 2017 11:25 am

Re: Use Feather Huzzah ESP32 with SPI TFT?

by dastels on Wed Oct 09, 2019 10:55 am

You say you have a generic TFT? Not an Adafruit product, then? Adafruit libraries are generally written with Adafruit products in mind, so they might (seem to be) assume things that aren't present on your board.

Dave

dastels
 
Posts: 745
Joined: Tue Oct 20, 2015 3:22 pm

Re: Use Feather Huzzah ESP32 with SPI TFT?

by scramma on Mon Oct 14, 2019 5:35 pm

Yes, it's a generic tft. I purchased a new one that has the DC (data/control) pin--as all the other required ones, but it still doesn't work.

Your point about the Adafruit libraries seeming to be crafted specifically for their TFTs is well taken. Their TFT is back-ordered, so I'm trying to get enough info to get this one going. There seems to be a paucity of information about their TFT requirements; it's kind of a "black box," which is very handy when there is one available, but difficult when trying to get a more generic one to work (also--less educational).

Thanks again.

scramma
 
Posts: 15
Joined: Fri Apr 07, 2017 11:25 am

Re: Use Feather Huzzah ESP32 with SPI TFT?

by eppfel on Tue Oct 29, 2019 12:21 pm

Hi there,

I have a bit related problem but with the 1.8" TFT Breakout. My sketch compiles fine on the Huzzah32 but I think I'm doing something wrong with the wiring.

According to the Pinout the Breakout Pins of the TFT go to the following Pins on the Feather:

VCC and LITE go to 3V
GND goes to GND
SCK goes to SCK / IO5
MOSI goes to MO / IO18

For TFT_CS, RESET and D/C I just picked IO12, IO27, IO33.

That's what I figured from the original wiring with the Arduino: https://learn.adafruit.com/1-8-tft-disp ... g-and-test
And the Pinouts from the Feather Huzzah ESP23: https://learn.adafruit.com/adafruit-huz ... er/pinouts

The test runs perfectly on an Arduino UNO but the display just is blank when I wire it to the Huzzah as described above. I changed the Pins in the example code, even called the library directly, because I was confused by the ESP32 definitions:
Code: Select all | TOGGLE FULL SIZE
Adafruit_ST7735 tft = Adafruit_ST7735(12, 27, 33);


Still a blank screen.

Any pointers what to try would be helpful?

Cheers

eppfel
 
Posts: 2
Joined: Tue Oct 29, 2019 11:44 am

Re: Use Feather Huzzah ESP32 with SPI TFT?

by eppfel on Thu Oct 31, 2019 11:30 am

Ok, I was stupid and just did not realise that the parameters are in a different order. Switching the wires for D/C and RESET and it worked. So, in order to make the example work with Huzzah32 you have to change the values for the pins under the ESP32 condition:

Code: Select all | TOGGLE FULL SIZE
#if defined(ESP32)
  #define TFT_CS         5
  #define TFT_RST        22
  #define TFT_DC         21

eppfel
 
Posts: 2
Joined: Tue Oct 29, 2019 11:44 am

Please be positive and constructive with your questions and comments.