Yet another 2.8" TFT ILI9341 blank screen

Hi all.

I'm trying to get my 2.8" TFT Restistive touch screen display to work, to no avail. I've tried a number of tutorials and example sketches, none of which have worked. Just a blank white screen, always.

This is the screen/shield I've bought:

I have plugged this shield straight into my Uno.
Shield pinout:

And here is a link to my code

This sketch verifies and uploads with no problems.

As I said in the first line, I've tried a number of different sketches which are all written for the same 'plug and play' 2.8" shield touch screen. All verify and upload with no problems. Still, only white.

Thanks in advance for any help.
Jake

Edit: In addition to the link to my code in create above, code copied below:

#include <Adafruit_GFX.h>                   // Core graphics library
#include <Adafruit_TFTLCD.h>                // Hardware-specific library
#include <SPI.h>
#include <Adafruit_ILI9341.h>
#include <XPT2046_Touchscreen.h>
#include "TouchScreen.h"                  // Touch Support


#define TS_MINX 920
#define TS_MINY 120
#define TS_MAXX 150
#define TS_MAXY 940
#define YP A3                             // must be an analog pin, use "An" notation!
#define XM A2                             // must be an analog pin, use "An" notation!
#define YM 9                              // can be a digital pin
#define XP 8                              // can be a digital pin

TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);

// macros for color (16 bit)
#define BLACK   0x0000
#define BLUE    0x001F
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF

#define LCD_CS A3                         // Chip Select goes to Analog 3
#define LCD_CD A2                         // Command/Data goes to Analog 2
#define LCD_WR A1                         // LCD Write goes to Analog 1
#define LCD_RD A0                         // LCD Read goes to Analog 0
#define LCD_RESET A4                      // Can alternately just connect to Arduino's reset pin

Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

void setup() {
  Serial.begin(9600);
  tft.reset();                            // Reset LCD
  tft.begin(0x9341);                      // Initialise LCD
  tft.fillScreen(BLACK);                  // Black Background
  tft.fillRect(0,0,240,160,GREEN);        // Upper GREEN Rectange
  tft.fillRect(0,160,240,160,RED);        // Lower RED Rectange
  tft.drawRect(0,0,240,160,WHITE);        // White borders to the rectangles
  tft.drawRect(0,160,240,160,WHITE);
  tft.setTextColor(WHITE);                // Set Text Proporties
  tft.setTextSize(2);
  tft.setCursor(80, 80);
  tft.println("Turn ON");                 // Write Text on LCD
  tft.setCursor(80, 240);
  tft.println("Turn OFF");
}

void loop() {
  /*TSPoint p = ts.getPoint();
  boolean led_state = false;
  if (p.z > 10 && p.z < 1000)             // Check touch validity
  {
    p.x = map(p.x, TS_MINX, TS_MAXX, tft.width(), 0);
    p.y = map(p.y, TS_MINY, TS_MAXY, tft.height(), 0);
    if (p.x > 0 && p.x < 240)
    {
      if (p.y > 0 && p.y < 160)
      {
        led_state = true;                 // Touched in Green rectangle
      } 
      else if (p.y > 160 && p.y < 320)
      {
        led_state = false;                // Touched in RED rectangle
      } 
    }
    Serial.print("LED State ");
    Serial.println(led_state);            // Print the status of the LED
  }
  delay (100);*/
}

Welcome to the forum

Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE

Why don't You post any code? How could we tell?
Read this link: How to get the best out of this forum - Using Arduino / Project Guidance - Arduino Forum

Hi mate
Thanks for the reply

Does the link to my code in the online IDE/web editor not work? Works for me when I click it.
I'll edit the original post adding the code

Links to unknown stuff is not what the advise tells You. Imagine being a helper downloading plenty of stuff each day. How long does it take until helpers computers start to get filled up, or crashed by an evil link?

There are ways to post code, as You discovered. The more You make helpers work to find the necessary information the less of interest You will get.

By the way. In order to get the topic readable always add new information in The last reply.

What controller do You use and for what controller is the code written? All "Arduinos" are not 100% compatible regarding code.

Thanks for the feedback.

The microcontroller is the ATMEGA328P, has a U after it.

The codes I used didn't stipulate what microcontroller they're for, but the code I posted is for a tutorial for this screen with a Uno R3, and to my understanding the Uno R3 only uses the ATMEGA328P. When I uploaded using the desktop IDE I selected this in the drop down box.

Sorry but please post real schematics, not anya colorful bird nest.
You better read the technical documentation learning what the "U" changes. I don't know what i stands for.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.