Report Bugs Here

Moderator: Mmiscool

User avatar
By Daniel Saiz
#59804 hello,
first of all, congratulations for this fantastic project !! i love it
I have a problem with TFT ILI9341 display
The displays works perfectly, and also the tft touch controller, but when I used the sample in the documentation of tft.checktouch().
Code: Select alltft.setup(16, 4, 3)

tft.touch.setup(15)

but1 = tft.obj.button("PUSH", 5,5,120,50,3)

chk1 = tft.obj.checkbox("Check Me", 5,100,40,1, 3)

lab1 = tft.obj.label("press", 0,190,200,24,3)

touchbranch [touchme]

wait

[touchme]

touch_obj = tft.checktouch()

serialprintln "checktouch " & touch_obj

if touch_obj = but1 then

  tft.obj.invert(but1)

  tft.obj.setlabel(lab1, "button")

end if

if touch_obj = chk1 then

  tft.obj.setlabel(lab1, "checkbox")

  tft.obj.invert(chk1)

end if

return

The axis coordinates are reversed and i can´t press any object, the coordinates of the object are in the opposite corner.
It is a tft problem?

Thank you
User avatar
By PhilTilson
#59831 I have no personal experience of this object, but from the documentation, I would assume that the command you have used - tft.init(16,4,3) - causes the display to be rotated through 270 degrees.

Have you tried using tft.init(16,4,1) instead, to see if that solves the problem?

If it does, this still suggests that there is a discrepancy between the display and the touch aspects of this object, which may require further study.

Phil
User avatar
By lpservices
#59967 Hello,
I had the same problem with this displays,
I made a patch in de touchcontroller routine to return the correct coordinates,
You will have to recompile from source to apply it.
If you are able to do this, let me know,
I will post the patch

Happy thinkering
Lpservices