Différences entre versions de « MicroPython.pyboard.généralités »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 35 : Ligne 35 :
 
# If all 4 LEDs cycle on and off slowly, then there was a hard fault. This cannot be recovered from and you need to do a hard reset.
 
# If all 4 LEDs cycle on and off slowly, then there was a hard fault. This cannot be recovered from and you need to do a hard reset.
  
 
+
== Où Acheter ==
 +
Vous pouvez vous procurer {{cl|56|une carte MicroPython}} chez MCHobby (vendus uniquement sur stock)!
  
 
{{MicroPython.pyboard.généralités-TRAILER}}
 
{{MicroPython.pyboard.généralités-TRAILER}}

Version du 25 janvier 2015 à 10:46

Système de fichier local et carte SD

There is a small internal filesystem (a drive) on the pyboard, called /flash, which is stored within the microcontroller’s flash memory. If a micro SD card is inserted into the slot, it is available as /sd.


When the pyboard boots up, it needs to choose a filesystem to boot from. If there is no SD card, then it uses the internal filesystem /flash as the boot filesystem, otherwise, it uses the SD card /sd.

(Note that on older versions of the board, /flash is called 0:/ and /sd is called 1:/).

The boot filesystem is used for 2 things: it is the filesystem from which the boot.py and main.py files are searched for, and it is the filesystem which is made available on your PC over the USB cable.

The filesystem will be available as a USB flash drive on your PC. You can save files to the drive, and edit boot.py and main.py.

Remember to eject (on Linux, unmount) the USB drive before you reset your pyboard.

Boot Modes

Boot modes que nous traduirons par mode de démarrage.

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

You can override this boot sequence by holding down the user switch as the board is booting up. Hold down user switch and press reset, and then as you continue to hold the user switch, the LEDs will count in binary. When the LEDs have reached the mode you want, let go of the user switch, the LEDs for the selected mode will flash quickly, and the board will boot. The modes are:

  1. Green LED only, standard boot: run boot.py then main.py.
  2. Orange LED only, safe boot: don’t run any scripts on boot-up.
  3. Green and orange LED together, filesystem reset: resets the flash filesystem to its factory state, then boots in safe mode.

If your filesystem becomes corrupt, boot into mode 3 to fix it. If resetting the filesystem while plugged into your compute doesn’t work, you can try doing the same procedure while the board is plugged into a USB charger, or other USB power supply without data connection.

Erreurs - clignotements des LEDs

There are currently 2 kinds of errors that you might see:

  1. 'If the red and green LEDs flash alternatively, then a Python script (ex main.py) has an error. Use the REPL to debug it.
  2. If all 4 LEDs cycle on and off slowly, then there was a hard fault. This cannot be recovered from and you need to do a hard reset.

Où Acheter

Vous pouvez vous procurer une carte MicroPython chez MCHobby (vendus uniquement sur stock)!



Source: General information about the pyboard écrit par/written by Damien P.George

Traduit par Meurisse D. pour MCHobby.be - Translated by Meurisse D. for 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.