Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

3.5" PiTFT touchscreen unresponsive using pygame
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

3.5" PiTFT touchscreen unresponsive using pygame

by ckelly321 on Sun Dec 29, 2019 2:33 pm

Hello, I have been trying desperately to get my 3.5" piTFT 480x320 touchscreen https://www.adafruit.com/product/2441 working with a pygame program. I have followed all of the installation instructions and the touchscreen works with x-window (desktop) , but when I try to use the touchscreen for pygame, the touchscreen is unresponsive and the mouse cursor remains at the top left corner of the screen. I read suggestions that on this forum that states that their is an issue with pygame and the version of SDL that ships with raspbian; however, after I changed SDL to be version 1.2 , the touchscreen is still not responsive and the mouse still shows at the top left.
Here is the solution that most people suggest to fix the pygame problem.

Code: Select all | TOGGLE FULL SIZE
#enable wheezy package sources
echo "deb http://archive.raspbian.org/raspbian wheezy main
" > /etc/apt/sources.list.d/wheezy.list

#set stable as default package source (currently jessie)
echo "APT::Default-release \"stable\";
" > /etc/apt/apt.conf.d/10defaultRelease

#set the priority for libsdl from wheezy higher then the jessie package
echo "Package: libsdl1.2debian
Pin: release n=jessie
Pin-Priority: -10
Package: libsdl1.2debian
Pin: release n=wheezy
Pin-Priority: 900
" > /etc/apt/preferences.d/libsdl

#install
apt-get update
apt-get -y --force-yes install libsdl1.2debian/wheezy


However, when I run the script it downloads many files, but not all and gives me this message.
E: Failed to fetch http://archive.raspbian.org/raspbian/di ... f/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
E: Release 'wheezy' for 'libsdl1.2debian' was not found


Here is me checking my SDL version
pi@Greenhouse:~ $ dpkg -l | grep libsdl
ii libsdl-image1.2:armhf 1.2.12-5+b2 armhf Image loading library for Simple DirectMedia Layer 1.2, libraries
ii libsdl-mixer1.2:armhf 1.2.12-11+b1 armhf Mixer library for Simple DirectMedia Layer 1.2, libraries
ii libsdl-ttf2.0-0:armhf 2.0.11-3 armhf TrueType Font library for Simple DirectMedia Layer 1.2, libraries
ii libsdl1.2-dev 1.2.15+dfsg1-4+rpt2 armhf Simple DirectMedia Layer development files
iU libsdl1.2debian:armhf 1.2.15+veloci1-1 armhf Simple DirectMedia Layer



Any suggestions would be EXTREMELY helpful as I have been trying everything with no luck so far!

ckelly321
 
Posts: 3
Joined: Mon Dec 29, 2014 10:13 pm

Re: 3.5" PiTFT touchscreen unresponsive using pygame

by ckelly4321 on Sat Jan 11, 2020 8:48 pm

Do the Adafruit staff monitor this forum to provide support? I am still waiting for some feedback....

ckelly4321
 
Posts: 1
Joined: Sat Jan 11, 2020 8:45 pm

Re: 3.5" PiTFT touchscreen unresponsive using pygame

by Drako123 on Sat Jan 25, 2020 10:52 pm

based on my experience when I installed and used SLIM (apt-get install slim) and set it as slim instead of lightdm (dpkg-reconfigure slim) it fixed that problem.

Drako123
 
Posts: 6
Joined: Sat Jan 25, 2020 10:46 pm

Please be positive and constructive with your questions and comments.