Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.

TFT 8357D and ESP8266
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

TFT 8357D and ESP8266

by rogercelliott on Sun Sep 13, 2020 11:26 pm

Hello this is my first post and I'm just starting to learn about Arduino and programming . I am using the program code which is partially listed below.
I have an hx8357d connected to an esp8266 as a test of the graphics, but I seem to be only getting the white screen of death. I have the TFT clk connected to d5 on the 8266, the miso connected to d6, mosi connected to d7 and cs is connected to d8. GND and 3-5v are connected to gnd and 3v3 respectively. The program compiles and runs ok but no response from the screen. The serial monitor does not show any error messages. What am I doing wrong?
Program code:
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution

#include <SPI.h>
#include "Adafruit_GFX.h"
#include "Adafruit_HX8357.h"

// These are 'flexible' lines that can be changed
#define TFT_CS 15
#define TFT_DC 5
#define TFT_RST -1 // RST can be set to -1 if you tie it to Arduino's reset

// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC, TFT_RST);

// SoftSPI - note that on some processors this might be *faster* than hardware SPI!
//Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC, MOSI, SCK, TFT_RST, MISO);

tft.color565(i, i, 0));

return t;

unsigned long testRoundRects() {
unsigned long start;
int w, i, i2,
cx = tft.width() / 2 ,
cy = tft.height() / 2 ;

w = min(tft.width(), tft.height());
start = micros();
for(i=0; i<w; i+=8) {
i2 = i / 2 - 2;
tft.drawRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(i, 100, 100));

return micros() - start;

unsigned long testFilledRoundRects() {
unsigned long start;
int i, i2,
cx = tft.width() / 2 + 10,
cy = tft.height() / 2 + 10;

start = micros();
for(i=min(tft.width(), tft.height()) - 20; i>25; i-=6) {
i2 = i / 2;
tft.fillRoundRect(cx-i2, cy-i2, i-20, i-20, i/8, tft.color565

Posts: 2
Joined: Thu Sep 10, 2020 4:41 pm

Please be positive and constructive with your questions and comments.