Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

2.8" PiTFT Capacitive Touch Issue
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: 2.8" PiTFT Capacitive Touch Issue

by MakerMelissa on Mon Mar 09, 2020 3:31 pm

Hello DannyBGoode,

I just pushed an update to the Raspberry Pi installer script today that helps with the rotation of the Capacitive Touch display in Buster. Would you like to re-download and give it another try?

Thanks,
Melissa

MakerMelissa
 
Posts: 176
Joined: Wed Jun 05, 2013 2:10 am

Re: 2.8" PiTFT Capacitive Touch Issue

by DannyBGoode on Tue Mar 10, 2020 10:09 am

I did a new install of Buster lite 9-26-19 twice - once with the original script, and once with the new. I can confirm that it does fix the touch rotation in EVTest - origin is now in the top left corner.

However, it doesn't help with my issue of touch positions not working in Pygame. They're still erratic and no where near where I'm touching...

Also, I can't remember what I did to get the symlink to the touch device (event 0) to work properly when I started messing with this a few months ago. So, to get things working quickly in my test program I changed from:

Code: Select all | TOGGLE FULL SIZE
os.putenv('SDL_MOUSEDEV', '/dev/input/touchscreen')


to:

Code: Select all | TOGGLE FULL SIZE
os.putenv('SDL_MOUSEDEV', '/dev/input/event0')


The issue here comes from a difference in drivers. In Stretch, it uses the EP0110M09 driver, but in Buster it uses a generic FT5x06 driver. Instead of figuring out what I needed to do to make the symlink work, I just changed the code to make it work quickly...

Danny

DannyBGoode
 
Posts: 25
Joined: Wed Nov 06, 2019 11:58 am

Re: 2.8" PiTFT Capacitive Touch Issue

by MakerMelissa on Tue Mar 10, 2020 11:18 am

Ok, thanks for the update. Since I'm working on the Capacitive Touch Display, I'll look into what might be causing it to not play well with PyGame and will let you know if I find anything.

MakerMelissa
 
Posts: 176
Joined: Wed Jun 05, 2013 2:10 am

Re: 2.8" PiTFT Capacitive Touch Issue

by MakerMelissa on Wed Mar 11, 2020 11:37 am

Hi DannyBGoode,

Apparently the Capacitive Touch display just doesn't work well with PyGame and hasn't for years. Here's some more information about some alternatives, but it sounds like you may have already found a solution.

https://learn.adafruit.com/adafruit-pit ... game-12-13

Thanks,
Melissa

MakerMelissa
 
Posts: 176
Joined: Wed Jun 05, 2013 2:10 am

Re: 2.8" PiTFT Capacitive Touch Issue

by DannyBGoode on Wed Mar 11, 2020 11:44 am

No, I don't have a working solution yet. I'll take a look at that and see if I can get something working.

Danny

DannyBGoode
 
Posts: 25
Joined: Wed Nov 06, 2019 11:58 am

Re: 2.8" PiTFT Capacitive Touch Issue

by DannyBGoode on Wed Mar 11, 2020 12:00 pm

I could successfully install his driver, (https://pigamedrv.github.io/userdoc/install), but by it's self it doesn't appear to help.

The script to downgrade the SDL isn't functional, and I don't know why. Script is found here (but originally posed in this forum apparently):

https://pigamedrv.github.io/technical_d ... sdl_libary

Here's what I get on the console when I run it:

Code: Select all | TOGGLE FULL SIZE
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian stretch InRelease [15.0 kB]
Ign:3 http://archive.raspbian.org/raspbian wheezy InRelease
Ign:4 http://archive.raspbian.org/raspbian wheezy Release
Ign:5 http://archive.raspbian.org/raspbian wheezy/main armhf Packages
Ign:6 http://archive.raspbian.org/raspbian wheezy/main all Packages
Get:7 http://mirrordirector.raspbian.org/raspbian stretch/main armhf Packages [11.7 MB]
Ign:8 http://archive.raspbian.org/raspbian wheezy/main Translation-en
Ign:9 http://archive.raspbian.org/raspbian wheezy/main Translation-en_US
Ign:5 http://archive.raspbian.org/raspbian wheezy/main armhf Packages
Ign:6 http://archive.raspbian.org/raspbian wheezy/main all Packages
Ign:8 http://archive.raspbian.org/raspbian wheezy/main Translation-en
Ign:9 http://archive.raspbian.org/raspbian wheezy/main Translation-en_US
Ign:5 http://archive.raspbian.org/raspbian wheezy/main armhf Packages
Ign:6 http://archive.raspbian.org/raspbian wheezy/main all Packages
Ign:8 http://archive.raspbian.org/raspbian wheezy/main Translation-en
Ign:9 http://archive.raspbian.org/raspbian wheezy/main Translation-en_US
Ign:5 http://archive.raspbian.org/raspbian wheezy/main armhf Packages
Ign:6 http://archive.raspbian.org/raspbian wheezy/main all Packages
Ign:8 http://archive.raspbian.org/raspbian wheezy/main Translation-en
Ign:9 http://archive.raspbian.org/raspbian wheezy/main Translation-en_US
Ign:5 http://archive.raspbian.org/raspbian wheezy/main armhf Packages
Ign:6 http://archive.raspbian.org/raspbian wheezy/main all Packages
Ign:8 http://archive.raspbian.org/raspbian wheezy/main Translation-en
Ign:9 http://archive.raspbian.org/raspbian wheezy/main Translation-en_US
Err:5 http://archive.raspbian.org/raspbian wheezy/main armhf Packages
  404  Not Found [IP: 93.93.128.191 80]
Ign:6 http://archive.raspbian.org/raspbian wheezy/main all Packages
Ign:8 http://archive.raspbian.org/raspbian wheezy/main Translation-en
Ign:9 http://archive.raspbian.org/raspbian wheezy/main Translation-en_US
Fetched 11.7 MB in 19s (603 kB/s)
Reading package lists... Done
N: Ignoring file 'wheezy.list
   ' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
W: The repository 'http://archive.raspbian.org/raspbian wheezy Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://archive.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages  404  Not Found [IP: 93.93.128.191 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
N: Ignoring file 'wheezy.list
   ' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: Release 'wheezy' for 'libsdl1.2debian' was not found


Ideas?

Danny

DannyBGoode
 
Posts: 25
Joined: Wed Nov 06, 2019 11:58 am

Re: 2.8" PiTFT Capacitive Touch Issue

by MakerMelissa on Wed Mar 11, 2020 12:03 pm

I found this in my research, but wasn't able to get it working myself. Perhaps you might be able to:

https://www.raspberrypi.org/forums/view ... &p=1526308

MakerMelissa
 
Posts: 176
Joined: Wed Jun 05, 2013 2:10 am

Re: 2.8" PiTFT Capacitive Touch Issue

by DannyBGoode on Wed Mar 11, 2020 12:27 pm

Also, the script above is also on your website (https://learn.adafruit.com/adafruit-2-8 ... ygame-tips). At first, I thought this one was a little different, but it's not...

I downloaded and installed the package found at https://www.raspberrypi.org/forums/view ... &p=1526308. Used the commands:

Code: Select all | TOGGLE FULL SIZE
wget https://www.dropbox.com/s/0tkdym8ojhcmbu2/libsdl1.2debian_1.2.15+veloci1-1_armhf.deb
sudo dpkg -i libsdl1.2debian_1.2.15+veloci1-1_armhf.deb
sudo apt-get -f install


Because of the issue with that other script, the last command didn't seem to do anything...

But, when running my test program, it appears to have helped, some. It's still no where near being correct, but at least there seems to be some order to where the presses are being registered - they're just not in the correct position...

I used your new installer script on it and almost seems as if the touch positions are still rotated off by 90 degrees... EVTest shows it correct, but Pygame is still off.

Danny

DannyBGoode
 
Posts: 25
Joined: Wed Nov 06, 2019 11:58 am

Re: 2.8" PiTFT Capacitive Touch Issue

by DannyBGoode on Fri Mar 13, 2020 9:54 am

Any update on your end. I've tried those drivers on a new install of Buster and Stretch with no help. I also found mention of a music player that uses an Adafruit TFT (3.5"), so I downloaded an image of it and switched the display setting to mine - same result.

Any luck on your end?

Is there a version of Raspbian that is actually known to work with the 2.8 Capacitive in Pygame? Since your website lists pygame info in with the installation instructions, I'm assuming there is....

Or is there something other than Pygame that will work for creating graphics that will work with the touch drivers?

Unless something gets working soon, I'm going to have to change to a different TFT... I've wasted weeks fighting this touch driver issue, and so unless I get it figured out soon, I'm going to have to move on to something else. I really don't want to do that as it will mean quite a bit of physical and programming changes, but I need touch working...

Danny


Danny

DannyBGoode
 
Posts: 25
Joined: Wed Nov 06, 2019 11:58 am

Re: 2.8" PiTFT Capacitive Touch Issue

by MakerMelissa on Fri Mar 13, 2020 4:44 pm

Hi,

Unfortunately I haven't come across anything else. The Adafruit TFT 3.5" uses a resistive touch screen, so you may have more luck with that. It seems the issue revolves around the capacitive touch.

Melissa

MakerMelissa
 
Posts: 176
Joined: Wed Jun 05, 2013 2:10 am

Re: 2.8" PiTFT Capacitive Touch Issue

by DannyBGoode on Fri Mar 13, 2020 5:00 pm

I was hoping for capacitive, but I'll take whatever works at this point...

Does the 2.8" resistive version work with Pygame? It's the same footprint, etc. correct? So if it would work, that would be the easiest solution...

Danny

DannyBGoode
 
Posts: 25
Joined: Wed Nov 06, 2019 11:58 am

Re: 2.8" PiTFT Capacitive Touch Issue

by DannyBGoode on Wed Mar 25, 2020 9:52 am

To update, I've purchased the resistive versions of the 2.8" and also the resistive 3.5" Adafruit TFT displays. Using the latest adafruit-pitft.sh script, I update for the new display and I'm getting the same behavior as the 2.8" capacitive screen with both of these in Pygame... This is with Stretch. I haven't tried Buster yet, and don't know that I will.

So, either there's either something fundamentally wrong with Pygame or with the adafruit drivers.

In the online Adafruit documentation, you have several complete images to download for older raspberry pi's. I didn't see anything that would work with the 3B+. Were these displays ever confirmed working in Pygame with the 3B+, or am I chasing something that's always been broken?..

Danny

DannyBGoode
 
Posts: 25
Joined: Wed Nov 06, 2019 11:58 am

Re: 2.8" PiTFT Capacitive Touch Issue

by MakerMelissa on Wed Mar 25, 2020 10:54 am

Hi,

That's disappointing to hear. My understanding is that PyGame just doesn't work well with touch displays anymore (based on what I've heard). I know I've personally used the resistive touch displays with Stretch with no problems, but I wasn't using PyGame.

Another option to look into is possibly running CircuitPython using Blinka and skipping PyGame altogether. I'd still recommend sticking with the resistive screens. If you're interested, you can check out this guide for getting started: https://learn.adafruit.com/circuitpytho ... rypi-linux. There should be CP libraries for the ILI9341 display and STMPE610 resistive touch screen controller.

Melissa

MakerMelissa
 
Posts: 176
Joined: Wed Jun 05, 2013 2:10 am

Re: 2.8" PiTFT Capacitive Touch Issue

by DannyBGoode on Wed Mar 25, 2020 11:08 am

I'll look into that. I'd rather not re-write everything in a different framework, but I need touch working...

I'm really thinking that my problems surround the need to revert to SDL 1.2. I'm wondering if the instructions here aren't working properly anymore:

https://learn.adafruit.com/adafruit-pit ... ygame-tips

Danny

DannyBGoode
 
Posts: 25
Joined: Wed Nov 06, 2019 11:58 am

Re: 2.8" PiTFT Capacitive Touch Issue

by MakerMelissa on Thu Mar 26, 2020 1:35 pm

Hi,

I understand. For Buster, it's definitely out of date, but you mentioned using Stretch and it appears like it was written for that. I haven't really used touch with PyGame myself, but I'm aware of a project that uses Touch and PyGame at https://learn.adafruit.com/freq-show-ra ... dr-scanner. It doesn't work with buster, but maybe it might be enough to help you out.

Melissa

MakerMelissa
 
Posts: 176
Joined: Wed Jun 05, 2013 2:10 am

Please be positive and constructive with your questions and comments.