Raspberry Pi Pico - How To Flash a MicroPython Script with Rshell (on Windows)

preview_player
Показать описание
It's time to move beyond the REPL: We'll use rshell to flash a script to our Raspberry Pi Pico microcontroller.

Other useful links:
CoolTerm works with Windows, Mac and Linux

Core Electronics is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:

Рекомендации по теме
Комментарии
Автор

Very usefull for "Raspberry Pi Pico Solar System" project. Thanks a lot!

paakire
Автор

Thanks for the info. I would like to know how can we stop this running of code? I mean how to reset Pico to default?

kp_kovilakam
Автор

Thank you for this great tutorial. Works like a charm also on my RasPi400. :)

MathiasLechner
Автор

Everything good until I run rshell --version. It shows the message below. Do you know how to fix it? because I found other people with the same problem but no solution...

PS C:\Users\stam_> rshell --version
Traceback (most recent call last):
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\Scripts\rshell-script.py", line 33, in <module>
sys.exit(load_entry_point('rshell==0.0.30', 'console_scripts', 'rshell')())
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\Scripts\rshell-script.py", line 25, in importlib_load_entry_point
return next(matches).load()
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\importlib\metadata\__init__.py", line 162, in load
module =
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\rshell\command_line.py", line 1, in <module>
import rshell.main
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\rshell\main.py", line 80, in <module>
import readline
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\readline.py", line 34, in <module>
rl = Readline()
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\pyreadline\rlmain.py", line 422, in __init__
BaseReadline.__init__(self)
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\pyreadline\rlmain.py", line 62, in __init__
mode.init_editing_mode(None)
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\pyreadline\modes\emacs.py", line 633, in init_editing_mode
self._bind_key('space', self.self_insert)
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\pyreadline\modes\basemode.py", line 162, in _bind_key
if not callable(func):
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\pyreadline\py3k_compat.py", line 8, in callable
return isinstance(x, collections.Callable)
AttributeError: module 'collections' has no attribute 'Callable'

do_while
Автор

Great Tutorial....
your keyboard is great.. can you tell me with brand and model?

TheCesarferreira
Автор

Thanks for sharing. I'm surprised Rasberry Pi haven't released any integrated program to do all this (like the Arduino IDE).

matthewfelgate
Автор

I'm trying to follow your example, but when I get to the part at 1:12 where I am supposed to check the version of rshell, I get an error returned with it saying "rshell is not recognized as the name of a
The pip install rshell seems to work with no errors. I'm not sure what to try next.

fordsrmaster
Автор

thank you for the easy to follow tutorial.
isn't it the same thing when you just save the code as (main.py) and Pico will runs it automatically.

BazChannal
Автор

So this thing sounds like a computer more than a micro-controller.

Does this have an OS? Can it run code directly?

jfdd
Автор

The last command just seems like you're copying main.py to a /pyboard folder. Will this work if I just copy the file using Windows explorer?

jameseze
Автор

れcp


Thank you for tech How to use rsell !, try RP2040 programming,

Yoko
Автор

How can I add a python module to the pico? E.G. the mpu9250

rubenlott
Автор

I wish these guides were on Linux or macOS! :(

koalalorenzo
Автор

Quite Informative!
I was wondering though, would it not work with Thonny?

muhammadhussain
Автор

Cant seem to use the same technique in Macbook. Any person succeeded in doing this on MacOS?

jonron