<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.mchobby.be/index.php?action=history&amp;feed=atom&amp;title=RASP-PiTFT-PLUS-Pygame</id>
	<title>RASP-PiTFT-PLUS-Pygame - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mchobby.be/index.php?action=history&amp;feed=atom&amp;title=RASP-PiTFT-PLUS-Pygame"/>
	<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=RASP-PiTFT-PLUS-Pygame&amp;action=history"/>
	<updated>2026-10-16T21:06:47Z</updated>
	<subtitle>Historique des révisions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=RASP-PiTFT-PLUS-Pygame&amp;diff=19524&amp;oldid=prev</id>
		<title>Admin : Page créée avec « {{RASP-PiTFT-PLUS-NAV}}  == Truc et astuces Pygame pour le PiTFT ==  Since the PiTFT screen is fairly small, you may need to write custom UI programs. Pygame is the easies... »</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=RASP-PiTFT-PLUS-Pygame&amp;diff=19524&amp;oldid=prev"/>
		<updated>2016-06-22T18:33:35Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « {{RASP-PiTFT-PLUS-NAV}}  == Truc et astuces Pygame pour le PiTFT ==  Since the PiTFT screen is fairly small, you may need to write custom UI programs. Pygame is the easies... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{RASP-PiTFT-PLUS-NAV}}&lt;br /&gt;
&lt;br /&gt;
== Truc et astuces Pygame pour le PiTFT ==&lt;br /&gt;
&lt;br /&gt;
Since the PiTFT screen is fairly small, you may need to write custom UI programs. Pygame is the easiest way by far to do this.&lt;br /&gt;
&lt;br /&gt;
Jeremy Blythe has an excellent tutorial here on getting started. &lt;br /&gt;
&lt;br /&gt;
However, before you follow that link you'll want to set up pygame for the best compatibility:&lt;br /&gt;
&lt;br /&gt;
== Installer pip &amp;amp; pygame ==&lt;br /&gt;
Pour installer pip&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-pip&lt;br /&gt;
&lt;br /&gt;
{{ADFImage|RASP-PiTFT-Pygame-00.jpg}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installer Pygame: &lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-pygame&lt;br /&gt;
&lt;br /&gt;
(ce qui prend un temps certain)&lt;br /&gt;
&lt;br /&gt;
{{ADFImage|RASP-PiTFT-Pygame-01.jpg}}&lt;br /&gt;
&lt;br /&gt;
== Utiliser la SDL 1.2 ==&lt;br /&gt;
'''Assurez-vous de bien utiliser la SDL 1.2'''&lt;br /&gt;
&lt;br /&gt;
SDL 2.x et SDL 1.2.15-10 ont quelques sérieuses incompatibilités avec l'écran tactile. Vous pouvez forcer l'utilisation de la SDL 1.2 en exécutant le script suivant. ([https://forums.adafruit.com/viewtopic.php?f=47&amp;amp;t=76169&amp;amp;p=439894#p435225 Merci à heine, dans le Forums Adafruit]!)&lt;br /&gt;
&lt;br /&gt;
Editer un nouveau fichier avec {{fname|sudo nano installsdl.sh}}&lt;br /&gt;
&lt;br /&gt;
et copier le texte suivant à l'intérieur:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
  &lt;br /&gt;
#enable wheezy package sources&lt;br /&gt;
echo &amp;quot;deb http://archive.raspbian.org/raspbian wheezy main&lt;br /&gt;
&amp;quot; &amp;gt; /etc/apt/sources.list.d/wheezy.list&lt;br /&gt;
&lt;br /&gt;
#set stable as default package source (currently jessie)&lt;br /&gt;
echo &amp;quot;APT::Default-release \&amp;quot;stable\&amp;quot;;&lt;br /&gt;
&amp;quot; &amp;gt; /etc/apt/apt.conf.d/10defaultRelease&lt;br /&gt;
&lt;br /&gt;
#set the priority for libsdl from wheezy higher then the jessie package&lt;br /&gt;
echo &amp;quot;Package: libsdl1.2debian&lt;br /&gt;
Pin: release n=jessie&lt;br /&gt;
Pin-Priority: -10&lt;br /&gt;
Package: libsdl1.2debian&lt;br /&gt;
Pin: release n=wheezy&lt;br /&gt;
Pin-Priority: 900&lt;br /&gt;
&amp;quot; &amp;gt; /etc/apt/preferences.d/libsdl&lt;br /&gt;
&lt;br /&gt;
#install&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get -y --force-yes install libsdl1.2debian/wheezy&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ensuite, exécutez les commandes suivantes:&lt;br /&gt;
&lt;br /&gt;
 sudo chmod +x installsdl.sh&lt;br /&gt;
 sudo ./installsdl.sh&lt;br /&gt;
&lt;br /&gt;
{{ADFImage|RASP-PiTFT-Pygame-20.jpg}}&lt;br /&gt;
&lt;br /&gt;
Ce qui force l'installation de la SDL 1.2&lt;br /&gt;
&lt;br /&gt;
{{ADFImage|RASP-PiTFT-Pygame-21.jpg}}&lt;br /&gt;
&lt;br /&gt;
OK '''maintenant''' vous pouvez continuer à utiliser pygame&lt;br /&gt;
&lt;br /&gt;
{{RASP-PiTFT-PLUS-TRAILER}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>