esp32, use HSPI pins for ST7735

Francis
Posts: 4
Joined: Mon Jan 11, 2021 1:35 pm

esp32, use HSPI pins for ST7735

Postby Francis » Mon Jan 11, 2021 2:17 pm

Hello everyone!

I am trying to connect my ST7735 to my esp32 devkit v1 via HSPI pins.
Unfortunatly, I can't make it work.

My code:

Code: Select all

#include <Adafruit_GFX.h>    
#include <Adafruit_ST7735.h>
#include <SPI.h>

#define TFT_CS         15
#define TFT_DC          2 
#define TFT_RST        4
#define TFT_MOSI     13
#define TFT_SCLK     14
#define TFT_BL          27

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

void setup(void)
{
	tft.initR(INITR_GREENTAB);
	tft.fillScreen(ST7735_BLACK);

	...a lots of drawings from library example code...
}
The screen remains white (it never becomes black nor draws anything).

I have seen here that CS pins may not work: https://www.esp32.com/viewtopic.php?f=1 ... SPI#p45176
I have on default SPI pins (VSPI i guess) a SD card connected. I would prefer not having multiple devices on the same bus, but maybe its the only solution.

Do you have any idea why the screen remains white?

Thank you for your help!

Francis

Francis
Posts: 4
Joined: Mon Jan 11, 2021 1:35 pm

Re: esp32, use HSPI pins for ST7735

Postby Francis » Tue Jan 12, 2021 2:38 pm

I changed ESP32 board and used shorter wires. Then the problem got solved!

Who is online

Users browsing this forum: Majestic-12 [Bot] and 143 guests