Hello guys,
im having a strange problem with the 1.8" TFT SPI display i got on Ebay.
any code i run, with any graphic library i run, will always display a white screen until i hit the arduino RESET. i can barely see the graphics running behind the almost completely white screen, until i hit RESET.
while the arduino RESET button is pressed, i could see the actual display properly in all correct colors! but once it boots up again - white screen again.
here is a video of the problem:
and here is an example code (from adafruit examples).
with this code, when arduino powers on - white screen.
when i hold the RESET button pressed - blue screen appears.
i did triple checked all connections and they are all good. im running 5V without the J1 jumper to set the LCD to work with 5V.
thanks.
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
// For the breakout, you can use any 2 or 3 pins
// These pins will also work for the 1.8" TFT shield
#define TFT_CS 10
#define TFT_RST 9 // you can also connect this to the Arduino reset
// in which case, set this #define pin to 0!
#define TFT_DC 8
// Option 1 (recommended): must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
// Option 2: use any pins but a little slower!
#define TFT_SCLK 13 // set these to be whatever pins you like!
#define TFT_MOSI 11 // set these to be whatever pins you like!
//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
float p = 3.1415926;
int BLPin = 7;
void setup(void) {
// Use this initializer if you're using a 1.8" TFT
tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab
// Use this initializer (uncomment) if you're using a 1.44" TFT
//tft.initR(INITR_144GREENTAB); // initialize a ST7735S chip, black tab
uint16_t time = millis();
tft.fillScreen(ST7735_BLUE);
time = millis() - time;
}
void loop() {
}