TFT touchpad display does not update with keypad press


I am trying to use a tft touchpad key pad to input numbers and, display the numbers as they are pressed - like a calculator. I have got a 2.4 MCUfriend shield working with an UNO and successfully written some script which displays the key pad and correctly updates serial monitor each time a key is pressed. However, I cannot get the TFT display digits to update even though the same variable correctly updates on serial monitor. I have written a simple counter for the TFT which works.

From what I have found so far, the line

(needed to read touchscreen presses) is preventing my variable from writing to the display. Any ideas?

The attached script is written with a variable assigned to figure 1 only at this time.

Thank you

20161219-key grid and touch sense on serial monitor V0.4.txt (3.68 KB)

The Touch shares pins with the TFT. After each call to getPoint(), you should restore the YP, XM pins to OUTPUT.

Exactly as advised in the example sketches.



David, thank you very much. Yep, it works.

Best regards and again, thanks.