Différences entre versions de « Hack-pycom-lopy-toolbox »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 35 : Ligne 35 :
 
REPL signifie '''R'''ead '''E'''valuate '''P'''rint '''L'''oop (boucle de lecture-évaluation-affichage), c'est le nom donné à la ligne de commande interactive de MicroPython qui vous offre un accès en ligne de commande sur votre plateforme MicroPython (PyBoard, WiPy, WiPy2, LoPy).  
 
REPL signifie '''R'''ead '''E'''valuate '''P'''rint '''L'''oop (boucle de lecture-évaluation-affichage), c'est le nom donné à la ligne de commande interactive de MicroPython qui vous offre un accès en ligne de commande sur votre plateforme MicroPython (PyBoard, WiPy, WiPy2, LoPy).  
  
Nous avons traité ce point en détail dans notre [[Hack-pycom-lopy-ftp|"Telnet et FTP" pour WiPy2 et LoPy]].
+
<font color="red">Nous avons traité ce point en détail dans notre [[Hack-pycom-lopy-ftp|"Telnet et FTP" pour WiPy2 et LoPy]].</font>
  
* Les modules
+
== Boot Mode et Safe Boot ==
* REPL, FTP --> rediriger vers les tutos existant/WiPy1
+
If you power up normally, or press the reset button, the LoPy will boot into standard mode; the {{fname|boot.py}} file will be executed first, then {{fname|main.py}} will run.
* Boot Mode
+
 
* Interruption
+
You can override this boot sequence by pulling {{fname|P12}} (G28) '''up''' (connect it to the 3V3 output pin) during reset. This procedure also allows going back in time to old firmware versions. The LoPy can hold up to 3 different firmware versions, which are: the factory firmware plus 2 OTA images.
* Pymakr IDE --> rediriger vers la page Pymakr
+
 
 +
After reset, if {{fname|P12}} is held high, the heartbeat LED will start flashing slowly in orange color, if after 3 seconds the pin is still being held high, the LED will start blinking a bit faster and the LoPy will select the previous OTA image to boot. If the previous user update is the desired firmware image, {{fname|P12}} must be released before 3 more seconds elapse. If after 3 seconds later, the pin is still high the factory firmware will be selected, the LED will flash quickly for 1.5 seconds and the LoPy will proceed to boot. The firmware selection mechanism is as follows:
 +
 
 +
'''Safe Boot Pin {{fname|P12}} released during:'''
 +
* '''Les 3 premières secondes''' - Safe boot, ''latest'' firmware is selected
 +
* '''Les 3 secondes suivantes''' - Safe boot, '''previous''' user update selected
 +
* '''La dernière seconde et demi''' - Safe boot, the '''factory''' firmware is selected
 +
 
 +
On all of the above 3 scenarios, safe boot mode is entered, meaning that the execution of both {{fname|boot.py}} and {{fname|main.py}} is skipped. This is useful to recover from crash situations caused by the user scripts. The selection made during safe boot is not persistent, therefore after the next normal reset the latest firmware will run again.
 +
 
 +
If you have problems with the filesystem you can format the internal flash drive.
 +
 
 +
== Reset / Réinitialisation ==
 +
 
 +
There are soft resets and hard resets. A soft reset simply clears the state of the MicroPython virtual machine, but leaves hardware peripherals unaffected. To do a soft reset, simply press Ctrl+D on the REPL, or within a script do:
 +
 
 +
<nowiki>>>> import sys
 +
>>> sys.exit()</nowiki>
 +
 
 +
A hard reset is the same as performing a power cycle to the board. In order to hard reset the LoPy, press the switch on the board or:
 +
 
 +
<nowiki>>>> import machine
 +
>>> machine.reset()</nowiki>
 +
 
 +
== Réinitialisation du système de fichier ==
 +
If you device’s filesystem gets corrupted (very unlikely, but possible), you can format it very easily by doing:
 +
 
 +
<nowiki>>>> import os
 +
>>> os.mkfs('/flash')</nowiki>
 +
 
 +
Resetting the flash filesystem deletes all files inside the internal LoPy storage (not the SD card), and restores the files {{fname|boot.py}} and {{fname|main.py}} back to their original states after the next reset.
 +
 
 +
== Gestion des interruptions ==
 +
x
  
 
{{LOPY-TRAILER}}
 
{{LOPY-TRAILER}}

Version du 26 mars 2017 à 20:28


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Voir liens https://docs.pycom.io/pycom_esp32/pycom_esp32/toolsandfeatures.html

ESP32 et Modules Pycom

Voici les caractéristiques principales des plateformes ESP_32 de Pycom.io et les modules disponibles.

Click the links in the list above to see more details on that feature. For all available modules and libraries, please visit the Firmware API Reference section.

Fiches Techniques

If you want to find out how things are connected, visit the datasheets section. Here you’ll find the datasheets for all of our products.

REPL via Telnet et port série

REPL signifie Read Evaluate Print Loop (boucle de lecture-évaluation-affichage), c'est le nom donné à la ligne de commande interactive de MicroPython qui vous offre un accès en ligne de commande sur votre plateforme MicroPython (PyBoard, WiPy, WiPy2, LoPy).

Nous avons traité ce point en détail dans notre "Telnet et FTP" pour WiPy2 et LoPy.

Boot Mode et Safe Boot

If you power up normally, or press the reset button, the LoPy will boot into standard mode; the boot.py file will be executed first, then main.py will run.

You can override this boot sequence by pulling P12 (G28) up (connect it to the 3V3 output pin) during reset. This procedure also allows going back in time to old firmware versions. The LoPy can hold up to 3 different firmware versions, which are: the factory firmware plus 2 OTA images.

After reset, if P12 is held high, the heartbeat LED will start flashing slowly in orange color, if after 3 seconds the pin is still being held high, the LED will start blinking a bit faster and the LoPy will select the previous OTA image to boot. If the previous user update is the desired firmware image, P12 must be released before 3 more seconds elapse. If after 3 seconds later, the pin is still high the factory firmware will be selected, the LED will flash quickly for 1.5 seconds and the LoPy will proceed to boot. The firmware selection mechanism is as follows:

Safe Boot Pin P12 released during:

  • Les 3 premières secondes - Safe boot, latest firmware is selected
  • Les 3 secondes suivantes - Safe boot, previous user update selected
  • La dernière seconde et demi - Safe boot, the factory firmware is selected

On all of the above 3 scenarios, safe boot mode is entered, meaning that the execution of both boot.py and main.py is skipped. This is useful to recover from crash situations caused by the user scripts. The selection made during safe boot is not persistent, therefore after the next normal reset the latest firmware will run again.

If you have problems with the filesystem you can format the internal flash drive.

Reset / Réinitialisation

There are soft resets and hard resets. A soft reset simply clears the state of the MicroPython virtual machine, but leaves hardware peripherals unaffected. To do a soft reset, simply press Ctrl+D on the REPL, or within a script do:

>>> import sys
>>> sys.exit()

A hard reset is the same as performing a power cycle to the board. In order to hard reset the LoPy, press the switch on the board or:

>>> import machine
>>> machine.reset()

Réinitialisation du système de fichier

If you device’s filesystem gets corrupted (very unlikely, but possible), you can format it very easily by doing:

>>> import os
>>> os.mkfs('/flash')

Resetting the flash filesystem deletes all files inside the internal LoPy storage (not the SD card), and restores the files boot.py and main.py back to their original states after the next reset.

Gestion des interruptions

x


Tutoriel PyCom Getting started (ESP_32) sous copyright de Damien George et contributeurs en ce qui concerne MicroPython et/ou PyCom en ce qui concerne les informations relatives a WiPy et LoPy.

Tutoriel traduit par Meurisse D. pour MCHobby.be

Traduit avec l'autorisation de micropython.org - Translated with the authorisation of micropython.org

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.