Modifications

Sauter à la navigation Sauter à la recherche
112 octets ajoutés ,  13 décembre 2015 à 13:41
Ligne 31 : Ligne 31 :  
{{traduction}}
 
{{traduction}}
   −
To get started using the LCD, try the following at the MicroPython prompt. Make sure the LCD skin is attached to the pyboard as pictured at the top of this page.
+
Pour débuter rapidement avec le LCD, essayez de saisir les commandes suivantes sur la ligne de commande MicroPython. Assurez-vous d'avoir attaché la carte d'extension LCD sur le PyBoard comme indiqué sur la photographie en début de cet article.
    
  <nowiki>>>> import pyb
 
  <nowiki>>>> import pyb
 
>>> lcd = pyb.LCD('X')
 
>>> lcd = pyb.LCD('X')
 
>>> lcd.light(True)
 
>>> lcd.light(True)
>>> lcd.write('Hello uPy!\n')</nowiki>
+
>>> lcd.write('Salut uPy!\n')</nowiki>
   −
You can make a simple animation using the code:
+
Vous pouvez réaliser une animation simple en utilisant le code suivant:
    
  <nowiki>import pyb
 
  <nowiki>import pyb
Ligne 45 : Ligne 45 :  
for x in range(-80, 128):
 
for x in range(-80, 128):
 
     lcd.fill(0)
 
     lcd.fill(0)
     lcd.text('Hello uPy!', x, 10, 1)
+
     lcd.text('Salut uPy!', x, 10, 1)
 
     lcd.show()
 
     lcd.show()
 
     pyb.delay(25)</nowiki>
 
     pyb.delay(25)</nowiki>
29 917

modifications

Menu de navigation