To explain - I am using the MCUFRIEND_kbv.h and TouchScreen.h libraries and have a number of touchscreen buttons - thanks to David Prentice setting them up was a dawdle once I grasped his code.
Some of these buttons I require to operate external devices e.g. a stepper motor and I assumed I could do this my changing the status of a pin on the Arduino Mega.
I had thought that you could touch and hold an on-screen button and this would allow a 'While' loop to work - in simple terms press the button and set a pin HIGH until the touchscreen button is released and it goes LOW.
Struggled for hours - couldn't get this to work so thought use two buttons one to switch ON another to switch OFF. Once again stumped - once in the While loop there is no way out!
Trying desperately to avoid any external buttons or other physical devices, switches etc.
Any help appreciated.