Paste our blink. Install your program as main.py on the board Unplug the Pico, close Thonny, replug the Pico without BOOTSEL, reopen Thonny ![]() MicroPython variant: Raspberry Pi Pico (choose W vs non W) Go to Run > Select interpreter and choose MicroPython (Raspberry Pi Pico). ![]() Set up Thonny Hold the BOOTSEL button on your Pico, and connect your Pico to your computer via USB. Open Thonny from the command line: thonnyĬlick Python version on bottom right of the screen (bad UI) For those on another operating system, download Thonny here and run the installer. Install Thonny: python3 -m pip install -user thonny It does the same steps as the CLI approach, but as usual with UIs making it more obscure what is actually happening behind the scenes :-) This is the procedure described on the official docs at: Every time you do this, the main.py program starts running automatically.Īfter installing, you can also use rshell to check the contents of main.py with: rshell -p /dev/ttyACM0 -buffer-size 512 cat /pyboard/main.py Unplug and replug the USB without holding BOOTSEL. # For Rpi Pico (non-W) it was like this instead apparently. This is what I tested with: import machine pyboard is a magic path to rshell, not actually present on the host. Rshell -p /dev/ttyACM0 -buffer-size 512 cp blink.py /pyboard/main.py Supposing you have a blinker program at blink.py in the current working directory, run: Install rshell on host: python3 -m pip install -user rshellĬopy your program to the board as main.py.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |