Modifications

Sauter à la navigation Sauter à la recherche
346 octets ajoutés ,  1 juin 2016 à 13:54
Ligne 58 : Ligne 58 :     
== Utiliser l'invite REPL ==  
 
== Utiliser l'invite REPL ==  
Now let’s try running some MicroPython code directly on the WiPy.
+
Essayons maintenant d'exécuter des instructions MicroPython directement sur le WiPy.
   −
With your serial program open (PuTTY, screen, picocom, etc) you may see a blank screen with a flashing cursor. Press Enter and you should be presented with a MicroPython prompt, i.e. {{fname|>>>}}. Let’s make sure it is working with the obligatory test:
+
Sur votre programme ''terminal série'' (PuTTY, screen, picocom, etc), vous devriez voir un écran vide avec un curseur qui clignote. Pressez la touche "Enter/Entrée/Retour clavier" et vous devriez voir apparaître l'invite de commande de MicroPython, ex: {{fname|>>>}}. Assurons nous que tout fonctionne correctement en utilisant le test ci-dessous:
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
>>> print("hello WiPy!")
+
>>> print("Salut WiPy!")
hello WiPy!
+
Salut WiPy!
 
</syntaxhighlight>
 
</syntaxhighlight>
   −
In the above, you should not type in the {{fname|>>>}} characters. They are there to indicate that you should type the text after it at the prompt. In the end, once you have entered the text {{fname|print("hello WiPy!")}} and pressed Enter, the output on your screen should look like it does above.
+
Vous ne devez pas saisir les caractères {{fname|>>>}} visible dans l'exemple ci-dessus. Ils sont affichés par WiPy et indique que vous pouvez saisir du texte directement après cette invite de commande.  
 +
A la fin, après avoir saisit le texte {{fname|print("Salut WiPy!")}} et pressez la touche Enter/Entrée/Retour clavier, la sortie d'écran devrait être mise-à-jour et ressembler à l'exemple ci-dessus.
   −
If you already know some Python you can now try some basic commands here.
+
Si vous connaissez déjà python, vous pourrez essayer quelques commandes élémentaires ici.
   −
If any of this is not working you can try either a hard reset or a soft reset; see below.
+
Si rien n'a l'air de fonctionner comme attendu, vous pouvez essayer de réaliser une réinitialisation matérielle (''hard reset'') ou une réinitialisation logicielle ; voyez plus loin.
   −
Go ahead and try typing in some other commands. For example:
+
Avançons et essayons quelques autres commandes. Par exemple:
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
 
>>> from machine import Pin
 
>>> from machine import Pin
 
>>> import wipy
 
>>> import wipy
>>> wipy.heartbeat(False)  # disable the heartbeat
+
>>> wipy.heartbeat(False)  # désactive le heartbeat
 
>>> led = Pin('GP25', mode=Pin.OUT)
 
>>> led = Pin('GP25', mode=Pin.OUT)
 
>>> led(1)
 
>>> led(1)
29 917

modifications

Menu de navigation