Table of Contents

Touch


This feature allows sensing of a finger or human touch to a pin, or when using a touch screen, use 'x' or 'y' to return the x & y positions where the screen is being touched.

  • Touch.Read(pin) - Read pin for touch, or reads the x y position on a touch screen
    pin: Pin number, 'x', or 'y'
    pin Returns: 0 = pin not touched, 1 = pin touched
    x or y Returns: -1 = screen not touched, x position , y position

This example detects human touching on pin 6, interval 100ms

while True:
    touched = duelink.Touch.Read(6)

    if (touched):
        print("touched")
                
    time.sleep(0.1)