Ligne 108 : |
Ligne 108 : |
| by entering {{fname|led.value()}} without parameter, you can query the current pin state (1 for High level, 0 for Low level). | | by entering {{fname|led.value()}} without parameter, you can query the current pin state (1 for High level, 0 for Low level). |
| | | |
− | === Run a file === | + | === Run & Stop a file === |
− | {{traduction}}
| |
− | | |
| With Thonny you can also write Python code inside a file and execute it at once on the target MicroPython board. | | With Thonny you can also write Python code inside a file and execute it at once on the target MicroPython board. |
| | | |
Ligne 137 : |
Ligne 135 : |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
− | Que l'on sauve dans un fichier sous le nom "demo.py" soit sur l'ordinateur, soit sur la carte microcontrôleur.
| + | Then save the file under the name "demo.py" either on the computer, either on the microcontroler board. |
| | | |
− | Peu importe l'emplacement du fichier (ordinateur ou microcontrôleur), il sera exécuté sur le microcontrôleur dans une session REPL.
| + | No matter where it is saved (computer or microcontroler), it can be executed against the microcontroler and shows the results into the REPL/shell session. |
| | | |
− | Pour exécuter le script il faut presser:
| + | To execute the script, you can either: |
− | * le bouton "Start" [[Fichier:ENG-CANSAT-PICO-THONNY-05.png]] | + | * Press the "Start" button [[Fichier:ENG-CANSAT-PICO-THONNY-05.png]] of the toolbar |
− | * le menu "Run | Run current script" ou | + | * Select the menu "'''Run | Run current script'''" |
− | * presser la touche "F5" | + | * Press the "F5" key |
| | | |
| [[Fichier:ENG-CANSAT-PICO-THONNY-06.png|480px]] | | [[Fichier:ENG-CANSAT-PICO-THONNY-06.png|480px]] |
| | | |
− | L'exécution du script affiche également les messages print() dans la section Shell en plus de faire pulser la LED de statut sur la carte.
| + | The script execution will displays the {{fname|print()}} messages into the Shell section of Thonny. |
| + | |
| + | As you may guess, the onboard status LED is also pulsing. |
| | | |
− | Le script peut être arrêté:
| + | To stop the script (since it run infinitly), you can either: |
− | * En pressant le bouton "Stop" | + | * press the "Stop" button on the toolbar |
− | * En pressant la combinaison de touche "Ctrl+C" | + | * Press the "Ctrl+C" combination into the shell section |
| | | |
| === Use the plotter === | | === Use the plotter === |