Modifications

Sauter à la navigation Sauter à la recherche
635 octets ajoutés ,  25 janvier 2015 à 15:29
Ligne 24 : Ligne 24 :  
La carte Micro Python est flashée (pré-installée) avec Micro Python pour le rendre instantanément accessible aussi bien au néophyte, au débutant, développeur curieux, maker qu'à l'expert, ingénieur ou roboticien.  La carte ne requière aucune installation/configuration, pas de compilateur, pas de soudure et si vous ne connaissez pas Python vous le découvrirez qu'il est très facile à apprendre.
 
La carte Micro Python est flashée (pré-installée) avec Micro Python pour le rendre instantanément accessible aussi bien au néophyte, au débutant, développeur curieux, maker qu'à l'expert, ingénieur ou roboticien.  La carte ne requière aucune installation/configuration, pas de compilateur, pas de soudure et si vous ne connaissez pas Python vous le découvrirez qu'il est très facile à apprendre.
   −
{{traduction}}
+
Vous branchez votre carte PyBoard sur votre ordinateur (fonctionne sur Windows, Mac et Linux) en utilisant un cable USB. PyBoard se comporte alors comme un lecteur Flash USB.
   −
You plug the board into your PC (Windows, Mac and Linux all work) using a USB cable.  It then acts just like a USB flash drive.
+
Contrôler des servo moteurs est aussi simple que d'écrire les quelques lignes de code suivantes:
 
  −
To control servo motors, it is a simple as writing the following code:
      
  <nowiki>pyb.servo(1, 45) # mettre le servo 1 a 45 degres
 
  <nowiki>pyb.servo(1, 45) # mettre le servo 1 a 45 degres
 
pyb.servo(2, 90) # set servo 2 a 90 degres</nowiki>
 
pyb.servo(2, 90) # set servo 2 a 90 degres</nowiki>
   −
Put this code in a text file and copy it to the Micro Python USB flash drive, press the reset button on the board and it will run! You can also open a terminal emulator (freely available for Windows, Mac and Linux) to connect to the board over USB and type these commands directly to the board (which gives you a Python command line), and it will run them as soon as you press the enter key.
+
Placez ce code dans un fichier texte puis copier le sur le lecteur Flash de Micro Python. Presser le bouton "''Reset''" (réinitialisation) de la carte et il fonctionnera! Vous pouvez également ouvrir un terminal émulateur (disponible gratuitement pour Windows, Mac et Linux) pour vous connecter sur la carte via USB et tapez ces commandes directement sur la carte (la ligne de commande Python est vraiment pratique), le moteur bougera immédiatement après que vous ayez pressé la touche Return/Entrée/Retour clavier.
   −
To flash an LED once a second, you could use the following code:
+
Pour faire clignoter une LED une fois par seconde, vous pouvez utiliser le code suivant:
    
  <nowiki>while True:  # Faire une boucle infinie
 
  <nowiki>while True:  # Faire une boucle infinie
Ligne 43 : Ligne 41 :  
     pyb.delay(1000)</nowiki>
 
     pyb.delay(1000)</nowiki>
   −
To read the accelerometer and print out the x-axis value:
+
Lire l’accéléromètre et afficher la valeur de l'axe-x:
    
  <nowiki>accel = pyb.mma() # obtenir les donnees de l accelerometre
 
  <nowiki>accel = pyb.mma() # obtenir les donnees de l accelerometre
 
print( accel[0] ) # afficher la donnee de l axe-X</nowiki>
 
print( accel[0] ) # afficher la donnee de l axe-X</nowiki>
   −
You have the full Python programming language at your disposal, and can write functions and classes, make lists and dictionaries, do string processing, read and write files (to the SD card or built-in flash storage), and have more sophisticated features such as generators, closures, list comprehension and exception handling. The possibilities for programming are endless!
+
Vous avez à votre disposition un langage de programmation Python complet. Vous pouvez écrire des fonctions et des classes, faire créer des listes et dictionnaires, faire du traitement de chaine de caractère (les ''string''), lire et écrire des fichiers (sur la carte SD ou la flash de stockage interne). Micro Python dispose même de fonctionnalités avancées tels que les générateurs, les [http://www.programiz.com/python-programming/closure closures] <small>(programiz.com)</small>, les [http://fgallaire.flext.net/comprehension-de-liste-en-python-map-filter/ comprehension list] <small>(fgallaire.flext.net)</small> et gestion d'exception. Les possibilités de programmation sont infinies!
    +
La carte dispose de nombreuses broches d'entrées/sorties que vous pouvez connecter sur d'autres circuits et vous pouvez y souder des fils pour inclure MicroPython dans vos propres projets.
   −
The board has many input/output pins which can be connected to other circuits, and you can solder on wires to make it part of your own project.  The board can run without a PC, as long as it is connected to a battery or other power supply between 3.6V and 10V.
      +
La carte peut fonctionner sans PC, pour autant qu'elle soit connectée sur une source d'alimentation/accu fournissant une tension entre 3.6V et 10V.
    +
{{traduction}}
 
Some of the rewards on offer include a kit of parts with the Micro Python board.  These kits allow you to get started programming and building things straight away.  There will be a set of online instructions explaining exactly how to get it all working, and detailing some example projects.  Even with just the Micro Python board on its own you can still do some pretty nifty things, such as logging accelerometer data, making a Python USB mouse, and using the USB serial Python command line.  These projects will also be explained online for you to follow.
 
Some of the rewards on offer include a kit of parts with the Micro Python board.  These kits allow you to get started programming and building things straight away.  There will be a set of online instructions explaining exactly how to get it all working, and detailing some example projects.  Even with just the Micro Python board on its own you can still do some pretty nifty things, such as logging accelerometer data, making a Python USB mouse, and using the USB serial Python command line.  These projects will also be explained online for you to follow.
  
29 917

modifications

Menu de navigation