I have looked at the demo programs and have success with a ILI9341 with printing to the screen and have looked at CreateButton but would like to understand how you can actually select a box by a touch input.
Do you just scan for a box that is close? Is there a better way?
A table has been suggested but 1st I need to know some of the philosophy of how you sense a graphic by getting a touch input.
It will eventually be learning how to change an empty box to a filled one if 'selected' by touch.
Any pointers?
Appreciation in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So, this is meant to return a value when you select within the described logical boxes. What is displayed on the GLCD is purely a picture... the XPT is doing all the hard work.
Notes: maxthingstocheck return value may need to be adapted. See the code below.
Kato-
Thanks for the philosophy lesson - makes a bit more sense to me now.
I will try this and once it works will start to change things to get a better understanding of this.
I appreciate the assist!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have looked at the demo programs and have success with a ILI9341 with printing to the screen and have looked at CreateButton but would like to understand how you can actually select a box by a touch input.
Do you just scan for a box that is close? Is there a better way?
A table has been suggested but 1st I need to know some of the philosophy of how you sense a graphic by getting a touch input.
It will eventually be learning how to change an empty box to a filled one if 'selected' by touch.
Any pointers?
Appreciation in advance.
The philosophy. Read the XY position from the XPT. Then, compare to range in the table.
Something like.. this is psuedo code.. it will need fixing.
Good luck
Here is something that compiles.
So, this is meant to return a value when you select within the described logical boxes. What is displayed on the GLCD is purely a picture... the XPT is doing all the hard work.
Notes: maxthingstocheck return value may need to be adapted. See the code below.
Kato-
Thanks for the philosophy lesson - makes a bit more sense to me now.
I will try this and once it works will start to change things to get a better understanding of this.
I appreciate the assist!