Go Down

Topic: 2.4 inch LCD TFT Display Shield only shows white! (Read 40285 times) previous topic - next topic

Ludvig

Yesterday when I arrived home, I remember I had another Arduino Uno in a sort of lego rover I once manage to make. So I decided to give it a try...

To my surprise, it did work! Now it is detecting it as 0x9325 and all the tests run flawlessly. Even if I set it as 0x9328 it works (haven't tried all the features yet).

I'm a bit embarrased to find out that the problem was in my board (that I have used for several tests and projects, it's now a matter of finding out what is wrong with it) but I hope my experience and info helps someone else.

Let me know if I can provide more info, for the records and thanks specially to david for your help!

david_prentice

The Arduino MUST have a good 3.3V pin for these Shields.

Most sketches and shields never use the 3.3V pin.

David.

pauldusa

Try adding these lib.

#include <TFTConsole.h>
#include <Adafruit_TFTLCD.h>
#include <Adafruit_GFX.h>
 
if you are just getting white

my 2.4 address is Ox9325

there is a 0x9341 one too

mind was white until I added in the TFTConsole, at github

pauldusa

// Works Fine as a test

// Uno & 2.4 TFT Lcd Adafruit shield

// Change Address in setup for your shield

#include <TFTConsole.h>
#include <Adafruit_TFTLCD.h>
#include <Adafruit_GFX.h>   
//#include <TouchScreen.h>


#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
#define LCD_RESET A4

#define TS_MINX 204
#define TS_MINY 195
#define TS_MAXX 948
#define TS_MAXY 910

#define YP A2  // must be an analog pin, use "An" notation!
#define XM A3  // must be an analog pin, use "An" notation!
#define YM 8   // can be a digital pin
#define XP 9   // can be a digital pin

#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);
//TouchScreen ts = TouchScreen(XP, YP, XM, YM, 200);

void setup() {
  Serial.begin(9600);
  Serial.print("Starting...");

   tft.reset();


// --------- Change Below for your Board's Address ----------
 
   tft.begin(0x9325);
 
 //tft.begin(0x9341);
 
 // ect.

//--------------------------------------------------------------

 
  tft.setRotation(1);

 tft.fillScreen(BLACK);

  //Print "PPM CO" Text
  tft.setCursor(80,30);
  tft.setTextColor(RED);
  tft.setTextSize(5);
  tft.print("Hello");

  delay(1000);
}

void loop() {
 
 
  tft.setCursor(40,100);
  tft.setTextColor(WHITE);
  tft.setTextSize(2);
  tft.print("No more white screen");

    tft.setCursor(40,150);
  tft.setTextColor(BLUE);
  tft.setTextSize(5);
  tft.print("Have Fun");

}

Go Up