Modifications

Sauter à la navigation Sauter à la recherche
404 octets ajoutés ,  12 novembre 2016 à 12:42
aucun résumé de modification
Ligne 41 : Ligne 41 :  
  </syntaxhighlight>
 
  </syntaxhighlight>
   −
Now rebuild the ESP8266 MicroPython firmware. From inside the VM's '''~/micropython/esp8266''' folder run:
+
Maintenant, recompilez votre firmware MicroPython pour ESP8266. Exécutez la commande suivante depuis le répertoire '''~/micropython/esp8266''' de votre machine virtuelle:
    
  <nowiki>make</nowiki>
 
  <nowiki>make</nowiki>
   −
Notice in the output the '''MPY modules/test.py''' line, this shows the '''test.py''' module was picked up by the build and frozen into bytecode:
+
Notez la ligne '''MPY modules/test.py''' dans les messages de compilation. Cela indique que le module '''test.py''' a été sélectionné par la compilation et gelé en bytecode:
    
{{ADFImage|FEATHER-CHARGER-MODULE-FROZEN-22.png}}
 
{{ADFImage|FEATHER-CHARGER-MODULE-FROZEN-22.png}}
   −
If you don't see this line for your module then try running the '''make clean''' command and then '''make''' command again.
+
Si vous ne constatez pas cette ligne pour les modules que vous tentez de geler alors essayez d'exécuter '''make clean''' puis encore une fois '''make'''.
   −
Now copy out the newly built firmware and flash it to the ESP8266.  Remember you're now using a development build so debug output will be enabled and features like the WebREPL must be manually started.
+
Vous pouvez maintenant copier et flasher le nouveau firmware fraîchement compiler sur votre ESP8266.  
   −
Connect to the REPL of the board with the new firmware and try using the test module's functions by running:
+
Souvenez vous que vous utilisez une compilation de type "développement". Les messages de débogage sont donc actif et des fonctionnalités tels que le WebREPL doivent être activés manuellement.
 +
 
 +
Connectez vous en REPL sur votre carte exécutant votre nouveau firmware personnalisé. Essayez les fonctions du module "test" en saisissant les commandes suivantes:
    
  <syntaxhighlight lang="python">
 
  <syntaxhighlight lang="python">
Ligne 63 : Ligne 65 :  
{{ADFImage|FEATHER-CHARGER-MODULE-FROZEN-23.png}}
 
{{ADFImage|FEATHER-CHARGER-MODULE-FROZEN-23.png}}
   −
You should see the module import and functions work just like if the .py file was on the filesystem!
+
Le module doit pouvoir être importé sans erreur... et l'appel des fonctions {{fname|add()}} et {{fname|substract()}} You should see the module import and functions work just like if the .py file was on the filesystem!
    
You can also freeze Python packages inside the '''modules''' folder.  Just create a directory for each package and put inside it an '''__init__.py''' and other source files for the package.
 
You can also freeze Python packages inside the '''modules''' folder.  Just create a directory for each package and put inside it an '''__init__.py''' and other source files for the package.
32 920

modifications

Menu de navigation