0

PiTFT 2.8" Resistive touchscreen, touch input not working
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

PiTFT 2.8" Resistive touchscreen, touch input not working

by Ar3dhel on Wed Jun 09, 2021 11:15 am

Hello :)

I assembled the 2.8" PiTFT screen and followed the software setup instructions here: https://learn.adafruit.com/adafruit-2-2-pitft-hat-320-240-primary-display-for-raspberry-pi. The display works like a charm, looks really nice :). Sadly however, the touchscreen capability doesn't work at all.

I looked into the FAQ and there was a solution for what appeared to be equivalent to my problem (https://forums.adafruit.com/viewtopic.php?f=50&t=104964), but the posted solution is 5 years old, and my system was already diverging at the first instruction (I could not find any .dtb files, only .dtbo, nor could I extract anything from the "/boot/overlays/pitft28-resistive.dtbo" file.

I do get this output from dmesg, which at least seems to imply to me that I have an equivalent issue:
Code: Select all | TOGGLE FULL SIZE
[    4.675025] stmpe-spi spi0.1: unknown chip id: 0x0
[    4.675077] stmpe-spi: probe of spi0.1 failed with error -22

However I am more of a hardware person than a software person, and not really sure where to go from here. If someone who knows something more up to date about this issue I would love to hear from you!

Thanks in advance,
Ar3dhel

Ar3dhel
 
Posts: 8
Joined: Wed Jun 09, 2021 11:05 am

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by mikeysklar on Wed Jun 09, 2021 7:55 pm

Ar3dhel,

How far did you get into the resistive touchscreen setup portion before you started seeing error messages? Our setup scripts only handle the display output, not the touchscreen portion.

https://learn.adafruit.com/adafruit-pit ... -2859004-4

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by Ar3dhel on Fri Jun 11, 2021 8:22 am

I ran the installer scripts to setup the screen. I didn't follow the instructions of the page you linked because at the top it says:

If you've grabbed our Easy Install image, or used the installer script, this step is not required, it's already done! This is just for advanced users who are curious on how to configure and customize the touchscreen


The installer scripts installed fine and I had no error messages there.

Ar3dhel
 
Posts: 8
Joined: Wed Jun 09, 2021 11:05 am

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by mikeysklar on Fri Jun 11, 2021 3:08 pm

Since the touch portion is not working we will have to do some testing to understand what might have gone wrong. Can you try these two commands from the manual configuration page.

# this should display touch events - if nothing detected try pinching the corners of the screen to see if anything is little off while pressing
Code: Select all | TOGGLE FULL SIZE
sudo evtest /dev/input/touchscreen


# manual calibration
Code: Select all | TOGGLE FULL SIZE
sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by Ar3dhel on Mon Jun 14, 2021 4:48 am

The evtest command didn't find a file there. When I run just sudo evtest I get the following as found events:

Code: Select all | TOGGLE FULL SIZE
$ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:   vnc-keyboard
/dev/input/event1:           vnc-abspointer
/dev/input/event2:   vnc-relpointer
Select the device event number [0-2]:


I don't think the pi is even aware there is a touchscreen, since the calibration line also fails, with:

Code: Select all | TOGGLE FULL SIZE
sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate
xres = 320, yres = 240
ts_read_raw: No such device


Thank you for your help :).

Ar3dhel
 
Posts: 8
Joined: Wed Jun 09, 2021 11:05 am

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by mikeysklar on Mon Jun 14, 2021 4:36 pm

Thanks for trying the evtest and ts_calibrate. They are just another confirmation that your /dev tree is getting hijacked by the dtoverlay.

Can you comment out the dtoverlay line in /boot/config.txt that looks something like:

Code: Select all | TOGGLE FULL SIZE
 dtoverlay=pitft-resistive,rotate=90,speed=64000000,fps=30


That will give your devices back and we will have to decide how to proceed from there.

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by Ar3dhel on Tue Jun 15, 2021 5:25 am

I have done that. Now on reboot the screen just displays whiteness, but I presume that's intentional

Ar3dhel
 
Posts: 8
Joined: Wed Jun 09, 2021 11:05 am

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by mikeysklar on Tue Jun 15, 2021 1:56 pm

Yes, the console will no longer output boot info to the display with the dtoverlay line commented out.

Can you try the userspace tools installation as that will be a good indicator if we have a PiTFT touch interface issue or kernel config problem with our script.

https://learn.adafruit.com/adafruit-pit ... pace-tools

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by Ar3dhel on Wed Jun 16, 2021 4:10 am

I followed the userspace page . . . got to this part:

Code: Select all | TOGGLE FULL SIZE
cd Adafruit_Userspace_PiTFT-master
sudo ./tftcp


Running ./tftcp doesn't mirror the hdmi display, the white screen just starts flickering and jumping. I did check, and /dev/spidev0.0 does exist. I also tried restarting, but nothing changed. Setting it to run on startup also doesn't help.

Ar3dhel
 
Posts: 8
Joined: Wed Jun 09, 2021 11:05 am

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by mikeysklar on Wed Jun 16, 2021 9:44 am

Thank you for trying the userspace install.

Last thing to try then go back to tftcp is a uninstall using the pitft script to make sure there are no conflicts preventing the userpsace tools from taking over the display.

If you rerun adafruit-pitft.py you should see an uninstall option to clear out the original settings. Another option would be to try installing userpsace tools from a fresh SD card Pi OS load to avoid any conflicts.

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by Ar3dhel on Thu Jun 17, 2021 4:47 am

I tried uninstalling and then doing the userspace install again. It still only provided the flashing white screen. I'd guess there's probably still something strange left over from the tft install script, but I don't have another SD card to test it on, sadly. Thank you for your help!

Ar3dhel
 
Posts: 8
Joined: Wed Jun 09, 2021 11:05 am

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by mikeysklar on Thu Jun 17, 2021 2:07 pm

Okay, let's revert back to the kernel setup and get your display back up and running with:

Code: Select all | TOGGLE FULL SIZE
sudo python3 adafruit-pitft.py --display=28r --rotation=90 --install-type=console


Then we can verify for any possible lose connections or screen physical assembly issue in regards to the touch interface before starting the replacement process.

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by Ar3dhel on Mon Jun 21, 2021 9:52 am

I have reinstalled the installer script as you described, it once again works fine just without touch. I did check the connections on the board again, but I don't see any loose connections or cross soldering. I'm not sure how replacement would work in this case however, since I didn't actually buy the screen myself, I got it through my university for a project. I will talk to them about it.

Ar3dhel
 
Posts: 8
Joined: Wed Jun 09, 2021 11:05 am

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by mikeysklar on Mon Jun 21, 2021 5:07 pm

On a previous PiTFT 2.8" I had come across an issue where the user could get some touch response when they:

If using my left thumb, I press on the lower lefthand corner of the screen, and then use my right hand to manipulate the screen, I get some touch response.


Also take a look at the connector on the front view looking at the screen top left here. I believe this is part of the touch overlay connector.

touchoverlay.jpeg
touchoverlay.jpeg (120.61 KiB) Viewed 65 times


If you happen to find the order# from Adafruit in the last month that would make the replacement process much easier to continue on with.

mikeysklar
 
Posts: 5020
Joined: Mon Aug 01, 2016 8:10 pm

Re: PiTFT 2.8" Resistive touchscreen, touch input not workin

by Ar3dhel on Thu Jun 24, 2021 3:29 am

I checked my connector in comparison with the image you sent, and I think one of the pins is not properly formed? I've attached an image of what I mean here, hopefully it loads properly. Second pin from the bottom doesn't seem to be properly connected.
tc_connect.JPG
tc_connect.JPG (213.59 KiB) Viewed 38 times

Ar3dhel
 
Posts: 8
Joined: Wed Jun 09, 2021 11:05 am

Please be positive and constructive with your questions and comments.