I am receiving a constant coordinates (4095) in top part (approximately 20 pixels) in TFT LCD 2.4 inch with the XPT2046 chip, now. While, i was receiving the Non-constant coordinates in this top part of TFT LCD 2.4 inch at a few days ago. why!? I did not change my program during this time. Does temperature cause this change in response? Please help me
Welcome to the forum
Do you think that posting your code (in code tags) and a schematic of your project showing all components, how they are connected and how they are powered, might help ?
Just a thought
#include <SPI.h>
#include <XPT2046_Touchscreen.h>
#include <Adafruit_ILI9341.h>
#define CS_PIN PC8
#define TIRQ_PIN PC9
#define TFT_DC PC7
#define TFT_CS PC6
#define EnBacklight PB3
XPT2046_Touchscreen ts(CS_PIN, TIRQ_PIN);
SPIClass SPI_1(1);
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
enableDebugPorts();
Serial1.begin(9600);
pinMode(EnBacklight, OUTPUT);
digitalWrite(EnBacklight, HIGH);
tft.begin();
ts.begin();
tft.fillScreen(ILI9341_BLACK);
digitalWrite(EnBacklight, LOW);
}
void loop() {
if (ts.tirqTouched()) {
if (ts.touched()) {
TS_Point p = ts.getPoint();
tft.fillRect(10, 10, 290, 40, ILI9341_BLACK );
tft.setCursor(25, 26);
tft.setTextColor(ILI9341_WHITE );
tft.setTextSize(2);
tft.println(String(p.x));
delay(100);
}
}
}
Do you get a different number displayed if you touch and hold the screen ?
Yes, I get a different number in 300 bottom pixels of touch screen

At a few days ago, I got a different condition. see the following figure

I think I have a down shift in the touch screen
This down shift is my problem. Because I'm afraid the touch screen will change in the next few days.
help me
what kind of touch screen is it? Resistive or Capacitive
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

