带Arduino Uno的2.4英寸TFT LCD SPFD5408 - 触摸不工作

时间:2016-01-07 10:36:04

标签: arduino-uno

我可以从这个链接中获取所有样本:

http://www.instructables.com/id/How-to-use-24-inch-TFT-LCD-SPFD5408-with-Arduino-U

由于某种原因,触摸屏部分无法正常工作

草图中可能没有正确设置某些引脚?

2 个答案:

答案 0 :(得分:3)

好的,这很奇怪......

在我购买的液晶屏蔽中,我必须将草图中的代码更改为:

#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

然后在SPFD5408_TouchScreen.cpp ...

return TSPoint(1023 - x, 1023 - y, z);

我希望他们在制作时可以停止更换这些板上的引脚!

实际上,我在以下方面取得了更大的成功: 返回TSPoint(1100 - x,1043 - y,z);

也许有人(程序员)可以解决这个问题。

同样在校准草图中更改:

TS_MINY=p1.y-( (tempL*10)>>10);// 10 pixels du bord

TO:

TS_MINY=p1.y-( (tempL*10)>>15);// 15 pixels du bord

希望这有助于某人!

答案 1 :(得分:0)

 :\Folder\file.ext
C:\Folder\file.ext

我希望他们在制作时可以停止更换这些板上的引脚!

实际上,我在以下方面取得了更大的成功:#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 And then in SPFD5408_TouchScreen.cpp... return TSPoint(1023 - x, 1023 - y, z);

也许有人(程序员)可以解决这个问题。

同样在校准草图中更改:

return TSPoint(1100 - x, 1043 - y, z);

要:

TS_MINY=p1.y-( (tempL*10)>>10);// 10 pixels du bord