Sort of a code question, sort of a hardware question. I'm working on some microcontroller projects involving a standard 4-wire resistive touchscreen.
I roughly understand how touchscreen controllers detect when the screen is pressed (when the screen is inactive, tie Y+ to ground and set X- to input, and trigger an interrupt when X- goes to ground, or something along those lines).
What I'm not sure about is how to detect a dragging motion on the screen, such as how a slider would be manipulated. In my head, the definition of a drag is a situation where the screen stays pressed, but the coordinate of the press is moving. Does this definition make sense? How do I detect such an event in code? I'm lost as to the logic to read a sliding motion.