PiTFT capacitive touchscreen problems


#1

I’m just starting investigation why PiTFT capacitive touchscreen used to work with libsdl-1.2.15-5, but doesn’t work with anything newer including libsdl2. Actually it works, but gives crazy jumping results. Please share any info you might have - I’m starting completely from scratch.

Reference link: https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/pitft-pygame-tips


#2

Some more info:

  1. evtest seems to be working fine
    pi@raspberrypi:~ $ evtest /dev/input/touchscreen
    Input driver version is 1.0.1
    Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
    Input device name: “EP0110M09”
    Supported events:
    Event type 0 (EV_SYN)
    Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
    Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
    Value 56
    Min 0
    Max 239
    Event code 1 (ABS_Y)
    Value 83
    Min 0
    Max 319
    Event code 47 (ABS_MT_SLOT)
    Value 0
    Min 0
    Max 1
    Event code 53 (ABS_MT_POSITION_X)
    Value 0
    Min 0
    Max 239
    Event code 54 (ABS_MT_POSITION_Y)
    Value 0
    Min 0
    Max 319
    Event code 57 (ABS_MT_TRACKING_ID)
    Value 0
    Min 0
    Max 65535
    Properties:
    Property type 1 (INPUT_PROP_DIRECT)
    Testing … (interrupt to exit)
    Event: time 1530745912.719829, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 85
    Event: time 1530745912.719829, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 108
    Event: time 1530745912.719829, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 6
    Event: time 1530745912.719829, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
    Event: time 1530745912.719829, type 3 (EV_ABS), code 0 (ABS_X), value 108
    Event: time 1530745912.719829, type 3 (EV_ABS), code 1 (ABS_Y), value 6
    Event: time 1530745912.719829, -------------- EV_SYN ------------
    Event: time 1530745913.187314, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 106
    Event: time 1530745913.187314, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 7
    Event: time 1530745913.187314, type 3 (EV_ABS), code 0 (ABS_X), value 106
    Event: time 1530745913.187314, type 3 (EV_ABS), code 1 (ABS_Y), value 7
    Event: time 1530745913.187314, -------------- EV_SYN ------------
    Event: time 1530745913.381375, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 104
    Event: time 1530745913.381375, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 6
    Event: time 1530745913.381375, type 3 (EV_ABS), code 0 (ABS_X), value 104
    pi@raspberrypi:~ $ cat /proc/bus/input/devices
    I: Bus=0018 Vendor=0000 Product=0000 Version=0000
    N: Name=“EP0110M09”
    P: Phys=
    S: Sysfs=/devices/platform/soc/20804000.i2c/i2c-1/1-0038/input/input0
    U: Uniq=
    H: Handlers=mouse0 event0
    B: PROP=2
    B: EV=b
    B: KEY=400 0 0 0 0 0 0 0 0 0 0
    B: ABS=2608000 3