Arduino ESP32 and SPI 4" Display

To start off I am trying to use an Arduino nano esp32 and a ST7796S 4" display to give real time data for an electric go-kart that I am building. I am doing so as there are very limited display options for VESC controllers out there and those that exist are no bigger than 2".

I have the nano ESP32 and the display. The first difficulty of this project is that most if not all the resources that I can find are for the OG ESP32 board so the pinouts are different. But alas there is a handy diagram that Arduino has so NBD. Currently have it wired as...

DISPLAY -------- ESP32
MISO -------------D12
MOSI ------------ D11
SCLK ------------ D13
CS --------------- D10
DC --------------- A1
RST --------------- RST
VCC ---------------3.3V
GND-------------GND

I am using the TFT_eSPI library and using lib 27 for the 7796 display. rPI is commented and Hz is to 40.

as follows is how I have it defined in the display 27 library

#define TFT_MISO 12
#define TFT_MOSI 11
#define TFT_SCLK 13
#define TFT_CS   18   // Chip select control pin
#define TFT_DC    10   // Data Command control pin
//#define TFT_RST   20   // Reset pin (could connect to RST pin)
#define TFT_RST  -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST

#define TFT_MISO 12
#define TFT_MOSI 11
#define TFT_SCLK 13
#define TFT_CS 18 // Chip select control pin
#define TFT_DC 10 // Data Command control pin
//#define TFT_RST 20 // Reset pin (could connect to RST pin)
#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST

"pin number" is set to default with Arduino pins in tools.

I currently just get a white display. No flicker when I upload various test "examples."

There are a lot of reasons can cause this - incorrect connections, incompatible library, lacks of initialization.
Do you have an example code to connect this display to any other arduino board? Did you test the display with it?

I haven't but I will try figuring out if there is something I can do with an Arduino nano every.

I'm using the 4" Touch Display (bought at Ali) with a ESP-32 S2 mini (Lolin). With the following configuration, the demos, with come with the TFT_eSPI lib, work for me:

wireing:

ESP32-S2	TFT-Display
9			SD0(MISO)
3V3			LED				Light
7			SCK				Clock
11			SDI(MOSI)
37			DC/RS			Data
3V3			RESET
12			CS				Chip Select
GND			GND				Ground
3V3			VCC				

ESP32-S2	Touch
7			T_CLK			Clock
13			T_CS			Chip Select
11			T_DIN			Data In = MOSI
9			T_DO			Data Out = MISO
-			T_IRQ			not used

Modifications in User_Setup.h

#define ST7796_DRIVER

#define TFT_MISO 9
#define TFT_MOSI 11
#define TFT_SCLK 7
#define TFT_CS   12  // Chip select control pin
#define TFT_DC   37  // Data Command control pin
//#define TFT_RST   4  // Reset pin (could connect to RST pin)
#define TFT_RST  -1  // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
#define TOUCH_CS 13     // Chip select pin (T_CS) of touch screen

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.