Modifications

Sauter à la navigation Sauter à la recherche
aucun résumé de modification
Ligne 4 : Ligne 4 :     
{{bloc-etroit
 
{{bloc-etroit
   |text = The Python code for Adafruit's Character LCDs on the Pi is available on Github at
+
   |text = Le code Python Raspberry-Pi produit par Adafruit pour l'afficheur LCDest disponible sur Github à
 
[https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code]
 
[https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code]
   −
There are two files we will be working with:
+
Nous allons travailler avec deux fichiers:
   −
* '''Adafruit_CharLCD.py''' : contains python class for LCD control
+
* '''Adafruit_CharLCD.py''' : contient la classe python pour le contrôle LCD
* '''Adafruit_CharLCD_IPclock_example.py''' : code for IP address and date/time calls methods from Adafruit_CharLCD.py
+
* '''Adafruit_CharLCD_IPclock_example.py''' : Code pour l'affichage de l'adresse IP et date/heure. Appelle les méthodes de  Adafruit_CharLCD.py
      −
The first file Adafruit_CharLCD.py is a mashup from two different sources of LCD code. Github user lrvick put together a [https://github.com/lrvick/raspi-hd44780/blob/master/hd44780.py nice python class]. His work is the baseline that is slowly being changed as we are bringing in more elements from the [https://github.com/arduino/Arduino/tree/master/libraries/LiquidCrystal Arduino LiquidCrystal library].  
+
Le premier fichier Adafruit_CharLCD.py est un mélange de deux code sources LCD différent. L'utilisateur lrvick sur Github à rassembler ces deux sources dans [https://github.com/lrvick/raspi-hd44780/blob/master/hd44780.py une excellente classe python]. Son travail est à la base de la librairie que nous proposons. Nous avons en effet adapté le code pour y inclure plus d'éléments de [https://github.com/arduino/Arduino/tree/master/libraries/LiquidCrystal la librairie LiquidCrystal d'Arduino].  
   −
The easiest way to get the code onto your Pi is to hook up an Ethernet cable, and clone it directly using 'git', which is installed by default on most distros. Simply run the following commands from an appropriate location (ex. "/home/pi"):
+
La meilleure façon d'installer ce code sur votre Pi est d'y raccorder un cable Ethernet, et d'en prendre une copie (clone) directement en utilisant 'git', qui est installé par défaut sur beaucoup de distributions. Exécutez les commandes suivantes depuis un répertoire approprié (ex: "/home/pi"):
 
}}
 
}}
   Ligne 25 : Ligne 25 :  
== Tester ==
 
== Tester ==
   −
You can test the wiring from the previous step by simply running the  Adafruit_CharLCD.py python code, as it has a little code it in that will simply display a test message when wired correctly
+
Vous pouvez tester le câblage réalisé lors des étapes précédentes en exécutant le code python de Adafruit_CharLCD.py . Il ne dispose que d'un peu de code... et si tout est raccordé correctement, vous verrez apparaître un message de test.
   −
If you're using a '''Version 2 Raspberry Pi''', pin '''#21''' has been replaced with pin '''#27''' so edit Adafruit_CharLCD.py and change:
+
Si vous utilisez un '''Raspberry Pi Version 2''',alors la broche '''#21''' de la carte à été remplacée avec la broche '''#27'''. Il faudra donc modifier Adafruit_CharLCD.py et changer la ligne:
    
  def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, '''21''', 22], GPIO = None):
 
  def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, '''21''', 22], GPIO = None):
   −
to
+
par
    
  def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, '''27''', 22], GPIO = None):
 
  def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, '''27''', 22], GPIO = None):
      −
you can use '''nano Adafruit_CharLCD.py''' to edit
+
vous pouvez utiliser la commande '''nano Adafruit_CharLCD.py''' pour modifier le fichier
    
  <nowiki>chmod +x Adafruit_CharLCD.py
 
  <nowiki>chmod +x Adafruit_CharLCD.py
Ligne 47 : Ligne 47 :  
| image      = [[File:StopHand.png|40px|alt=Stop]]
 
| image      = [[File:StopHand.png|40px|alt=Stop]]
 
| textstyle  = color: red; font-weight: bold; font-style: italic;
 
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text      = This script assumes you'll want to display the Ethernet (eth0) IP address. You may want to replace eth0 with wlan0 or wlan1 (etc) for Wireless IP address!  
+
| text      = Ce script par du principe que c'est l'adresse IP de la connexion filaire Ethernet (eth0) qui sera affichée. Vous pourriez avoir envie de remplacer eth0 par wlan0 ou wlan1 (etc) pour les adresses IP des réseaux Wifi!  
 
}}
 
}}
  
29 917

modifications

Menu de navigation