issue174:micro-ci_micro-la
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue174:micro-ci_micro-la [2021/11/01 13:15] – d52fr | issue174:micro-ci_micro-la [2021/11/04 09:39] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
According to the repository main page, the utility is “A simple shell based file explorer for ESP8266 and WiPy Micropython based devices.” Just so you know, mpfshell works on more than just the ESP8266 and the WiPy. I’ve tested it on the ESP8266, the ESP32, and the Raspberry Pi Pico, and it works just fine on all three devices. For complete transparency, | According to the repository main page, the utility is “A simple shell based file explorer for ESP8266 and WiPy Micropython based devices.” Just so you know, mpfshell works on more than just the ESP8266 and the WiPy. I’ve tested it on the ESP8266, the ESP32, and the Raspberry Pi Pico, and it works just fine on all three devices. For complete transparency, | ||
+ | |||
+ | Parfois, lorsque vous mettez à jour votre microcontrôleur avec une nouvelle version de MicroPython, | ||
+ | |||
+ | J'ai trouvé un utilitaire appelé mpfshell qui peut vous rendre la vie beaucoup plus facile. Vous pouvez trouver son dépôt à l' | ||
+ | |||
+ | Selon la page principale du dépôt, l' | ||
**Of course, you need to install the program to be able to use it, which is easy since it is on PyPi. In a terminal, you need to use only pip. On your main machine, open a terminal and type | **Of course, you need to install the program to be able to use it, which is easy since it is on PyPi. In a terminal, you need to use only pip. On your main machine, open a terminal and type | ||
Ligne 25: | Ligne 31: | ||
mpfs [/]> ** | mpfs [/]> ** | ||
+ | |||
+ | Bien sûr, vous devez installer le programme pour pouvoir l' | ||
+ | |||
+ | $ pip install mpfshell | ||
+ | |||
+ | Vous pouvez également télécharger le dépôt complet et l' | ||
+ | |||
+ | Une fois installé, ouvrez un terminal dans le dossier où vous souhaitez copier les fichiers de l' | ||
+ | |||
+ | Avant de commencer, vous devez savoir à quel port série votre appareil est connecté (voir ci-dessus). | ||
+ | |||
+ | Habituellement, | ||
+ | |||
+ | Maintenant, il suffit de lancer le programme : | ||
+ | |||
+ | $ mpfshell | ||
+ | |||
+ | ** Micropython File Shell v1.1.2, sw@kaltpost.de & junhuanchen@qq.com & lht856@foxmail.com ** | ||
+ | -- Exécuté sur Python 3.7 en utilisant PySerial 3.4 -- | ||
+ | |||
+ | mpfs [/]> ** | ||
+ | |||
**Next, you have to tell mpfshell to connect to the device on the correct serial port with the open {port} command. I’ve seen this just seems to lock up sometimes. If that happens just do a < | **Next, you have to tell mpfshell to connect to the device on the correct serial port with the open {port} command. I’ve seen this just seems to lock up sometimes. If that happens just do a < | ||
Ligne 47: | Ligne 75: | ||
Of course, the files on your Microcontoller will be different from what’s on mine, but you get the idea.** | Of course, the files on your Microcontoller will be different from what’s on mine, but you get the idea.** | ||
+ | |||
+ | Ensuite, vous devez dire à mpfshell de se connecter au périphérique sur le bon port série avec la commande open {port}. J'ai vu que cela semble se bloquer parfois. Si cela arrive, faites simplement un < | ||
+ | |||
+ | mpfs [/]> open / | ||
+ | Connected to esp32 | ||
+ | mpfs [/ | ||
+ | |||
+ | Remarquez que mpfshell vous indique le type de périphérique auquel vous êtes connecté. Cela peut être très utile si vous avez plusieurs périphériques connectés. Maintenant que vous êtes connecté à votre microcontrôleur, | ||
+ | |||
+ | mpfs [/]> ls | ||
+ | Remote files in '/': | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | rnerd_ssd1306_esp32_graphics1.py | ||
+ | | ||
+ | mpfs [/]> | ||
+ | |||
+ | Bien sûr, les fichiers sur votre microcontrôleur seront différents de ceux qui se trouvent sur le mien, mais vous avez compris l' | ||
**Now, let’s do a complete copy from the ESP32 (or whatever your Microcontroller is) to the computer’s hard drive. To do this, you need to use the mget command. However, you need to use a special command. The command is mget .*\.py . You might recognize that this command uses a regular expression (regex) to get all files. | **Now, let’s do a complete copy from the ESP32 (or whatever your Microcontroller is) to the computer’s hard drive. To do this, you need to use the mget command. However, you need to use a special command. The command is mget .*\.py . You might recognize that this command uses a regular expression (regex) to get all files. | ||
Ligne 74: | Ligne 124: | ||
* put gfx.py | * put gfx.py | ||
mpfs [/]> ** | mpfs [/]> ** | ||
+ | |||
+ | Maintenant, faisons une copie complète de l' | ||
+ | |||
+ | mpfs [/]> mget .*\.py | ||
+ | * get boot.py | ||
+ | * get esp32i2cscan.py | ||
+ | * get gfx.py | ||
+ | * get image1.py | ||
+ | * get image2.py | ||
+ | * get rnerd_ssd1306_esp32.py | ||
+ | * get rnerd_ssd1306_esp32_graphics1.py | ||
+ | * get ssd1306.py | ||
+ | mpfs [/ | ||
+ | |||
+ | Pour effectuer une copie en masse de votre ordinateur vers le microcontrôleur, | ||
+ | |||
+ | mpfs [/]> mput .*\.py | ||
+ | * put ssd1306.py | ||
+ | * put boot.py | ||
+ | * put image2.py | ||
+ | * put rnerd_ssd1306_esp32_graphics1.py | ||
+ | * put rnerd_ssd1306_esp32.py | ||
+ | * put image1.py | ||
+ | * mettre esp32i2cscan.py | ||
+ | * put esp32i2cscan.py | ||
+ | * put gfx.py | ||
+ | mpfs [/ | ||
**You can copy a single file by just using the get or put command. | **You can copy a single file by just using the get or put command. | ||
Ligne 93: | Ligne 170: | ||
mpfs [/]> ** | mpfs [/]> ** | ||
+ | |||
+ | Vous pouvez copier un seul fichier en utilisant tout simplement les commandes get ou put. | ||
+ | |||
+ | mpfs [/]> get boot.py | ||
+ | mpfs [/]> put boot.py | ||
+ | | ||
+ | mpfs [/]> | ||
+ | |||
+ | Si, à un moment donné, vous ne vous souvenez plus de la commande que vous devez utiliser, tapez simplement help. | ||
+ | |||
+ | mpfs [/]> help | ||
+ | |||
+ | Documented commands (type help < | ||
+ | ======================================== | ||
+ | EOF close execfile | ||
+ | cat ef | ||
+ | cd exec lcd | ||
+ | |||
+ | mpfs [/]> | ||
+ | |||
**You can also get help on any of the commands... | **You can also get help on any of the commands... | ||
Ligne 112: | Ligne 209: | ||
Until next time, as always; stay safe, healthy, positive and creative!** | Until next time, as always; stay safe, healthy, positive and creative!** | ||
+ | |||
+ | Vous pouvez également obtenir de l'aide sur n' | ||
+ | |||
+ | mpfs [/]> help mget | ||
+ | mget < | ||
+ | Download all remote files that match the given regular expression. | ||
+ | The local files will be named the same as the remote files. | ||
+ | " | ||
+ | # | ||
+ | #Les fichiers locaux seront nommés de la même manière que les fichiers distants. | ||
+ | #« mget » ne récupère pas les répertoires, | ||
+ | |||
+ | mpfs [/ | ||
+ | |||
+ | Et pour quitter mpfshell, tapez simplement quit. | ||
+ | |||
+ | mpfs [/]> quit | ||
+ | greg@earth : $ | ||
+ | |||
+ | J' | ||
+ | |||
+ | Jusqu' | ||
+ |
issue174/micro-ci_micro-la.1635768907.txt.gz · Dernière modification : 2021/11/01 13:15 de d52fr