1.8" TFT LCD 128X160 ST7735 Stuck at white screen

Hello, I have tried tons of tutorials and different code but I can not get this display to do anything put output white no matter what I do.

Link to display : https://www.amazon.com/gp/product/B07WDJ3TV6

How I have my wiring setup :

|-------------------------|
|LCD        |	ArduinoUNO|
|-----------|-------------|
|VCC:	    |	+5V       |
|GND:	    |	GND       |
|GND:	    |	GND/NC    |
|NC:	    |	NC        |
|NC:	    |	NC        |
|NC:	    |	NC        |
|CLK/SCK:   |	Pin 13    |
|SDA/MOSI:  |	Pin 11    |
|RS/DC:	    |	pin 9     |
|RST:	    |	pin 8     |
|CS:	    |	pin 10    |

Current code in IDE :

/*

 TFT Color Picker

 This example for the Arduino screen reads the input of
 potentiometers or analog sensors attached to A0, A1,
 and A2 and uses the values to change the screen's color.

 This example code is in the public domain.

 Created 15 April 2013 by Scott Fitzgerald

 http://arduino.cc/en/Tutorial/TFTColorPicker

 */

// pin definition for the Uno
#define cs   10
#define dc   9
#define rst  8

// pin definition for the Leonardo
// #define cs   7
// #define dc   0
// #define rst  1

#include <TFT.h>  // Arduino LCD library
#include <SPI.h>

TFT TFTscreen = TFT(cs, dc, rst);

void setup() {
  // begin serial communication
  Serial.begin(9600);

  // initialize the display
  TFTscreen.begin();

  // set the background to white
  TFTscreen.background(255, 255, 255);

}

void loop() {

  // read the values from your sensors and scale them to 0-255
  /*int redVal = map(analogRead(A0), 0, 1023, 0, 255);
  int greenVal = map(analogRead(A1), 0, 1023, 0, 255);
  int blueVal = map(analogRead(A2), 0, 1023, 0, 255);
*/
  // draw the background based on the mapped values
 /* TFTscreen.background(redVal, greenVal, blueVal);
  */
  //46miao 300ci
  /*
  while(i--)
  {
  TFTscreen.background(255, 0, 0);
  TFTscreen.background(0, 255, 0);
  TFTscreen.background(0, 0, 255);
  }*/
  TFTscreen.background(255, 0, 0);//delay(330);
  TFTscreen.background(0, 255, 0);//delay(330);
  TFTscreen.background(0, 0, 255);
  // send the values to the serial monitor
 /* Serial.print("background(");
  Serial.print(redVal);
  Serial.print(" , ");
  Serial.print(greenVal);
  Serial.print(" , ");
  Serial.print(blueVal);
  Serial.println(")");

  // wait for a moment
  delay(33);
*/
}

I’ve tried using 3.3v but that does not work and the screen just dims.

Install Adafruit_ST7735 and Adafruit_GFX via the IDE Library Manager.

Plug the screen into your Uno:

And use the appropriate bit-bang constructor in the library examples:

// For ST7735-based displays, we will use this call
//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
Adafruit_ST7735 tft = Adafruit_ST7735(     A5,      A3,      A2,       A1,      A4);

Verify that your screen works correctly.

Then you can try using the Hardware SPI pins i.e. 11 (MOSI), 13 (SCLK) on a Uno

//  Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
    Adafruit_ST7735 tft = Adafruit_ST7735(    10,      9,      8);

Forget about TFT.h I strongly advise using the regular Adafruit_GFX style libraries

David.

Thanks so much david, while using it with A0-A5 pins etc it works perfect, however when using the hardware spi pins it boots and works for ~1 second and then goes back to white if you want i can send a video, again thanks.

I don't have your display, but the general procedure is:

  1. start with bit-bang constructor
  2. re-wire for HW SPI
  3. edit bit-bang constructor for the HW SPI wiring
  4. run with bit-bang constructor
  5. run with HW constructor

e.g.

//bit-bang constructor:
//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
Adafruit_ST7735 tft = Adafruit_ST7735(     10,       9,      11,       13,       8);
//HW SPI constructor
//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
Adafruit_ST7735 tft = Adafruit_ST7735(    10,      9,      8);

The hardest part of getting started with a library example is physical wiring. And using the appropriate constructor.

I would expect the Adafruit examples to work 100% with either constructor. Obviously the bit-bang will be much SLOWER.

Please try my suggested constructors. Report back with any problems.

It looks as if you get a fresh set of Dupont jumper cables. So your wiring should be fairly robust and reliable. Never use loose or worn jumper cables.

David.

Nevermind, got it working, bad wire

Go on. Was it a bad dupont from your new display?

Or were you using old jumper cables?

David.

switched out a jumper wire from 13 to mosi and it fixed itself. Thanks for the help.