I just got a 2.8 inch touch shield for a small project I'm working on and plugged everything in to test, downloading the libraries. I ran the graphics test and tftpaint test with no problems, then attempted to write my own code to start designing. After writing the simple program, which consisted of a loop that outputs mills(), I attempted to reupload and run the graphics test and the screen went white, no longer displaying anything. No matter how many times I unplug/replug the power supply, or use USB/external power, the screen just stays white with its backlight on. I haven't touched the board besides plugging it into the Arduino Uno I'm using. All the libraries were downloaded yesterday (the 23rd).
The program looked something like this (very small details might be off):
Code: Select all
#include <Adafruit_GFX.h>
#include <Adafruit_TFTLCD.h>
#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
#define LCD_RESET A4
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
void setup(void) {
tft.reset();
uint16_t identifier = tft.readID();
tft.begin(identifier);
tft.fillScreen(BLACK);
tft.setCursor(0, 0);
tft.setTextColor(GREEN); tft.setTextSize(5);
tft.println("System");
tft.println("Start!");
tft.println("");
tft.setTextColor(WHITE); tft.setTextSize(3);
tft.println("Hello World.");
}
void loop(void) {
tft.setCursor(0, 20);
tft.setTextColor(CYAN); tft.setTextSize(3);
tft.print(mills());
}