After the TFT Touch Shield I ordered had arrived and some playing around with the examples that were part of the library that can be found here, it was time to do some testing.
For starters I made a small sketch with just a string, 3 ‘touchable’ areas and an icon. The first challenge was making the drawLine() function from the library working; somehow it had problems with drawing the left side of the roof of the ‘home’ icon. No clue why, but it just didn’t work. Only after I changed the parameter types from unsigned int to int and replaced the algorithm with the simplified version of the Bresenham line algorithm the home was correctly drawn.
Next thing I did was printing some touch related information to the Serial and this is what I saw:
X = 611, Y = 442, P = 575 X = 609, Y = 443, P = 536 X = 606, Y = 444, P = 507 X = 599, Y = 447, P = 457 X = 599, Y = 447, P = 449 X = 600, Y = 440, P = 486 X = 601, Y = 434, P = 522 X = 642, Y = 604, P = 470 X = 634, Y = 609, P = 468
Well, so far so good… on to the next phase!