Modifications

Sauter à la navigation Sauter à la recherche
312 octets ajoutés ,  9 février 2018 à 13:17
aucun résumé de modification
Ligne 1 : Ligne 1 :  
{{RASP-PiOLED-NAV}}
 
{{RASP-PiOLED-NAV}}
  −
{{traduction}}
      
== Introduction ==
 
== Introduction ==
Ligne 240 : Ligne 238 :  
     time.sleep(.1)  
 
     time.sleep(.1)  
 
</syntaxhighlight>
 
</syntaxhighlight>
  −
{{traduction}}
      
En utilisant la classe subprocess, python peut utiliser des commandes Linux pour accéder aux informations systèmes du Pi. La boucle {{fname|while}} effectue un rafraîchissement de l'écran 10 fois par seconde.  
 
En utilisant la classe subprocess, python peut utiliser des commandes Linux pour accéder aux informations systèmes du Pi. La boucle {{fname|while}} effectue un rafraîchissement de l'écran 10 fois par seconde.  
Ligne 247 : Ligne 243 :  
Voilà, c'est tout en ce qui concerne le code de '''stats.py''' !
 
Voilà, c'est tout en ce qui concerne le code de '''stats.py''' !
   −
== More Demos & Examples ==
+
== Plus d'exemples ==
You can check out our other examples in the example, just make sure to edit each one with '''nano animate.py''' for example, and find the line that says:
+
Vous pouvez consulter les autres exemples du sous-répertoire {{fname|examples}}.
 +
 
 +
Assurez-vous d'éditer chacun des exemples (avec '''nano animate.py''' par exemple) et trouvez la ligne mentionnant:
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
Ligne 255 : Ligne 253 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
and change it to:
+
et la changer en :
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
 
# Raspberry Pi pin configuration:
 
# Raspberry Pi pin configuration:
RST = None # PiOLED does not require reset pin
+
RST = None # PiOLED n'a pas besoin de la broche Reset
 
</syntaxhighlight>
 
</syntaxhighlight>
   −
and make sure that the configuration section where you choose which type of display, looks like this
+
puis assurez vous que la configuration section utilise la déclaration correspond à votre afficheur PiOled... comme ceci:
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
Ligne 278 : Ligne 276 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
That is, we'll be using I2C 128x32 display!
+
Voila, le script d'exemple utilise maintenant un afficheur I2C 128x32 pixels (sans broche Reset)!
   −
== Speeding Up the Display ==
+
== Améliorer la vitesse de l'afficheur ==
For the best performance, especially if you are doing fast animations, you'll want to tweak the I2C core to run at 1MHz. By default it may be 100KHz or 400KHz
+
Pour de meilleures performances, plus spécialement si vous avez besoin d'animation rapide, vous pouvez optimiser le fonctionnement du bus I2C pour qu'il fonctionne 1MHz. En effet, le bus est configuré à la fréquence 100KHz ou 400KHz
   −
To do this edit the config with '''sudo nano /boot/config.txt'''
+
Pour modifier la vitesse du bus, éditez le fichier de configuration avec '''sudo nano /boot/config.txt'''
   −
and add to the end of the file
+
et ajoutez la ligne suivante à la fin du fichier
   −
'''dtparam=i2c_baudrate=1000000'''
+
<syntaxhighlight lang="python">
 +
dtparam=i2c_baudrate=1000000
 +
</syntaxhighlight>
    
{{ADFImage|RASP-PiOLED-Utiliser-06.png|640px}}
 
{{ADFImage|RASP-PiOLED-Utiliser-06.png|640px}}
   −
reboot to 'set' the change.
+
Redémarrer le Pi pour appliquer les modifications.
 
      
{{RASP-PiOLED-TRAILER}}
 
{{RASP-PiOLED-TRAILER}}
29 917

modifications

Menu de navigation