Modifications

Sauter à la navigation Sauter à la recherche
638 octets ajoutés ,  26 mars 2017 à 12:01
Ligne 39 : Ligne 39 :     
== Créer un projet ==
 
== Créer un projet ==
{{traduction}}
+
Pymakr à la possibilité de synchroniser et d'exécuter du code avec votre périphérique. Ce que l'on fait principalement durant le développement de projet. Les étapes suivantes vous permettrons de débuter.
Pymakr has a feature to sync and run your code on your device. This is mostly done using projects. The following steps will get you started.
+
* Sélectionnez Project > New project (''Projet > Nouveau Projet'') dans Pymakr.
* In Pymakr, go to Project > New project.
+
* Donner lui un nom et sélectionnez le répertoire (ou créer en un) pour stocker les sources de votre projet.
* Give it a name and select a folder for your project, either a new of existing one.
+
* Créez y 2 fichiers: main.py et boot.py (s'ils n'y sont pas encore disponibles).
* Create two files: main.py and boot.py, if you don’t already have those.
     −
{{ambox|text=You can also [[Hack-pycom-lopy-ftp|use FTP]] to download boot.py and main.py from the board to your project folder, after which you can right-click the project viewer and use the ‘add source files’ option to add them to your project.}}
+
{{ambox|text=Vous pouvez également [[Hack-pycom-lopy-ftp|utiliser FTP]] pour télécharger les fichiers boot.py et main.py actuels de votre carte vers le répertoire de développement nouvellement créé. Ensuite, il faut faire un clique droit sur dans l'explorateur de fichier (''project viewer'') et utiliser l'option "add source files" (''ajouter des fichiers source'') pour ajouter ces fichiers dans votre nouveau projet.}}
   −
The boot.py file should always have the following code on the top, so we can run our python scripts over serial or telnet:
+
Le fichier {{fname|boot.py}} devrait toujours contenir le contenu suivant (en début de fichier), ce qui permet d'utiliser le périphérique via une connexion série ou une connexion telnet:
    
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
Ligne 56 : Ligne 55 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
Most users, especially WiPy users, would want a wifi script in the boot.py file. A basic wifi script but also more advanced WLAN examples, like fixed IP and multiple networks, can be found in the [[Hack-wipy-wlan|Wifi Examples]] chapter.
+
La plupart des utilisateurs, plus particulièrement les utilisateurs WiPy, voudrons un script d'initialisation WiFi dans leur fichier boot.py. Un fichier WiFi de base fonctionnera très bien mais il existe également des scripts de configuration WLAN avancés (support d'IP fixe, de réseaux multiples). Vous trouverez ces scripts dans le chapitre [[Hack-wipy-wlan|Wifi Examples]].
   −
Besides the neccesary main.py and boot.py files, you can create any folders and python files or libraries that you want to include in your main file. Pymakr will synchronize all files in the project to the board when using the sync button.
+
Après les fichiers {{fname|main.py}} et {{fname|boot.py}} nécessaires, vous pouvez créer des répertoires, fichiers pythons ou bibliothèque python que vous appellerez depuis votre fichier {{fname|main.py}}.
 +
 
 +
Pymakr synchronisera également tous les fichiers du projet avec la carte lorsque vous utilisez le bouton de synchronisation "sync".
    
=== Ajouter des fichiers ===
 
=== Ajouter des fichiers ===
 +
{{traduction}}
 
If you create any files (and folder) to your project directory from outside of pymakr, they won’t appear in your project files. To add them, right-click on the left sidebar in the Project-Viewer when you have your project open, and click ‘Add source files’.
 
If you create any files (and folder) to your project directory from outside of pymakr, they won’t appear in your project files. To add them, right-click on the left sidebar in the Project-Viewer when you have your project open, and click ‘Add source files’.
  
29 917

modifications

Menu de navigation