Comments (8)
Hi,
In mine TFTs I need invert the coords.
Can be in your case it not necessary.
Please modify the SPFD5408_TouchScreen, line 159:
before:
//return TSPoint(x, y, z);
// *** SPFD5408 change -- Begin
// SPFD5408 change, because Y coordinate is inverted in this controller
return TSPoint(x, 1023 - y, z);
// -- End
after:
return TSPoint(x, y, z);
// *** SPFD5408 change -- Begin
// SPFD5408 change, because Y coordinate is inverted in this controller
//return TSPoint(x, 1023 - y, z);
// -- End
If this ok, I can create an #define for this
Please send me if this ok now.
Regards
Joao
from spfd5408.
+1
from spfd5408.
Solved this in a strange way, but works...
used this tip to invert some pins
https://forum.arduino.cc/index.php?topic=405377.0
Swap the X and Y pin number in the sketch. Change this part:
Original
#define YP A1 // must be an analog pin, use "An" notation!
#define XM A2 // must be an analog pin, use "An" notation!
#define YM 7 // can be a digital pin
#define XP 6 // can be a digital pin
to
#define XM A1 // must be an analog pin, use "An" notation!
#define YP A2 // must be an analog pin, use "An" notation!
#define XP 7 // can be a digital pin
#define YM 6 // can be a digital pin
and set the "SPFD5408_TouchScreen.cpp"to
//return TSPoint(x, y, z);
// *** SPFD5408 change -- Begin
// SPFD5408 change, because Y coordinate is inverted in this controller
return TSPoint(1023- x, 1023 - y, z);
// -- End
Something tell me that I got a trick myself, but works!!
from spfd5408.
Thank You, the only working way ive found on the internet!!!!
from spfd5408.
For me this work fine. I played with the TSPoint parameters. And BAM!
// *** SPFD5408 change -- Begin
// SPFD5408 change, because Y coordinate is inverted in this controller
return TSPoint(1100 - y, 1023 - x, 1023 - z);
// -- End
from spfd5408.
For me this work fine. I played with the TSPoint parameters. And BAM!
// *** SPFD5408 change -- Begin
// SPFD5408 change, because Y coordinate is inverted in this controller
return TSPoint(1100 - y, 1023 - x, 1023 - z);
// -- End
from spfd5408.
For me this work fine. I played with the TSPoint parameters. And BAM!
// *** SPFD5408 change -- Begin
// SPFD5408 change, because Y coordinate is inverted in this controller
return TSPoint(1100 - y, 1023 - x, 1023 - z);
// -- End
from spfd5408.
For me this work fine. I played with the TSPoint parameters. And BAM!
// *** SPFD5408 change -- Begin
// SPFD5408 change, because Y coordinate is inverted in this controller
return TSPoint(1100 - y, 1023 - x, 1023 - z);
// -- End
from spfd5408.
Related Issues (20)
- Could I get some help porting this to the Arduino Due? HOT 1
- Comment about your changes applied to my repo
- SD Card problem HOT 1
- How to move the tft lcd data pin
- touch inverted along the diagonal HOT 3
- 2 or more duplicated screen HOT 15
- MODELO COMPATIVEL? HOT 2
- Compile fro Arduino Due HOT 3
- TouchScreen doesn't seem to be working with Arduino Leonardo HOT 2
- Solved Toch problem inverted x and y,line 163 in SPFD5408_TouchScreen.cpp
- Possible to turn backlight off?
- Initializing spfd5408 on Arduino Uno R3
- converting to ESP32
- Null pointer while trying to compile
- Raspberry Pi Zero
- ID 0x4040 HOT 1
- TFT rotation and Touch coordinates HOT 1
- Pro mini HOT 2
- Support for This Model?
- Mirrored text HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spfd5408.