Anybody had problems with Pygame on PiTFT on Raspbian Jessie? No? Well on Raspbian Jessie Pygame apparently works normally, except that the PiTFT touchscreen mouse doesnt work properly on Pygame. If you touch the touchscreen in the same spot a few times, you would find that the cursor just moves around randomly. That may have only been for my code, but apparently others are also having the same problems. Like in https://forums.adafruit.com/viewtopic.php?f=47&t=76169.
How do we fix the problem? If you are a Linux noob like me, I found some commands that will help
Works as of 11/12/2015:
sudo apt-get install libsmpeg0
cd /tmp
wget http://archive.raspbian.org/raspbian/pool/main/libs/libsdl1.2/libsdl1.2debian_1.2.15-5_armhf.deb
sudo dpkg -i libsdl1.2debian_1.2.15-5_armhf.deb
wget http://archive.raspbian.org/raspbian/pool/main/p/pygame/python-pygame_1.9.1release+dfsg-10_armhf.deb
sudo dpkg -i python-pygame_1.9.1release+dfsg-10_armhf.deb
I'm not very sure whether some of these downgrading commands are redundant, so it would be nice if you can comment if you think so.
Basically, There have been some problems with SDL or Pygame, so I downgraded these packages.
That's all. Thanks for reading.
Friday 11 December 2015
Saturday 27 June 2015
Rotate Pitft Display without rebooting
PiTFTs are awesome! But, to rotate the display you still need to modify the configuration files and reboot. I searched on the Internet for a while and I could not find a way to rotate the display on the fly without rebooting, until now.
Works as of 25/6/15
Just type these commands to rotate the display:
sudo rmmod fb_ili9340
sudo rmmod fbtft_device
sudo modprobe fbtft_device name=pitft rotate=90 #replace 90 with the rotation angles 0, 90, 180, 270
To recalibrate the touchscreen according to the rotation, just type this:
sudo adafruit-pitft-touch-cal -f
That's all. Thanks for reading.
Works as of 25/6/15
Just type these commands to rotate the display:
sudo rmmod fb_ili9340
sudo rmmod fbtft_device
sudo modprobe fbtft_device name=pitft rotate=90 #replace 90 with the rotation angles 0, 90, 180, 270
To recalibrate the touchscreen according to the rotation, just type this:
sudo adafruit-pitft-touch-cal -f
That's all. Thanks for reading.
Subscribe to:
Posts (Atom)