1
votes

I can get all the samples to compile from this link:

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

For some reason the touch screen part is not working

Some pins are maybe not set correctly in the sketch?

2
Nothing to do with hardware - It is pure code causing issues.. Think before just down voting...user5721976
Also think it is better for Arduino people to vote on these questions, as they know what we are talking about here... Someone who has actually held an Arduino board in their hands...user5721976

2 Answers

3
votes

Ok, weird this is...

In the lcd shield I bought I had to change to code in the sketch to:

#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);

I wish they can stop changing pins on the these boards when they produce them!

Actually, I had better success with: return TSPoint(1100 - x, 1043 - y, z);

Maybe someone (programmer) can figure this out.

Also in calibration sketch changed:

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

TO:

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

Hope this helps someone!

-2
votes

I just copied and pasted the answer above, and seeks credit for it.

#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);

I wish they can stop changing pins on the these boards when they produce them!

Actually, I had better success with: return TSPoint(1100 - x, 1043 - y, z);

Maybe someone (programmer) can figure this out.

Also in calibration sketch changed:

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

To:

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