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 shell-script.py", line 33, in sys.exit(load_entry_point('rshell==0.0.30', 'console_scripts', 'rshell')()) File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\Scripts shell-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 = import_module(match.group('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 "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages shell\command_line.py", line 1, in import rshell.main File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages shell\main.py", line 80, in import readline File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages eadline.py", line 34, in rl = Readline() File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\pyreadline lmain.py", line 422, in __init__ BaseReadline.__init__(self) File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\pyreadline lmain.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'
There will likely be an IDE experience soon. This command line method is a good fallback and useful for programming many boards in batches - like if you're creating your own product.
Arduino has mentioned an RP2040 port is on the bake; so it shouldn't be too long until you can select from the Arduino menu Boards > RP2040 (or something to that effect). Days/weeks/months, unsure. But it's in work :)
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 cmdlet......." The pip install rshell seems to work with no errors. I'm not sure what to try next.
Depending on your build, you may need to install rshell with "pip3 install rshell" instead If you run into more issues, we can provide much better support over on our forums: forum.core-electronics.com.au/
It's a micro-controller. Not very different from a arduino. It doesn't have an os (not what we would define as an os). It runs code that gets stored on the internal storage, or while connected to it. It can run code in either c++ or micropython. All the info about it here www.raspberrypi.org/documentation/pico/getting-started/
Having tried that myself it seems the answer is no. The documentation for the Pico seems a bit thin at the moment, so it would be really useful to know what exactly is going on with that copy, and how one can emulate it without rshell. Where is the documentation that enabled the author of this video to learn how to do it? The really odd thing is that, although file clearly persist on the Pico, they don't show up when it's mounted as a USB drive. Again, more documentation needed.
I haven't done it *yet* with the pico, but rsh is pretty straightforward. Plug your pico into your Linux box, and if you don't get some type of notice of where it is, look in /var/log/messages or whatever to see what device Linux associates to it. Basically the same process as figuring out which drive is which if you have several newly connected. Once you have it, you can use rcp instead of rsh, which would be a lot fewer steps.
We have a Thonny guide coming out in the next couple of hours :) We just wanted to be sure the new public release of Thonny works the same way (pretty much does, so stay tuned!)
In the Mac terminal type `$ ls /dev/tty.*` to find the COM port being used. It will probably come back as `/dev/tty.usbmodem000000001`. So then to connect to rshell on Mac use `$ rshell -p /dev/tty.usbmodem000000001 --buffer-size 512`. Note that's a double dash before buffer-size. Note, I didn't count how many zeros there are on usb.modem00000001 here but make sure you do. The rest is the same. Enjoy!
That seems right - main.py is what is "run" when MicroPython reboots. Other file names would be useful for custom libraries and code; which could be included within main.py as needed.
Very usefull for "Raspberry Pi Pico Solar System" project. Thanks a lot!
This is perfect! Brilliant video
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
shell-script.py", line 33, in
sys.exit(load_entry_point('rshell==0.0.30', 'console_scripts', 'rshell')())
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\Scripts
shell-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 = import_module(match.group('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 "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages
shell\command_line.py", line 1, in
import rshell.main
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages
shell\main.py", line 80, in
import readline
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages
eadline.py", line 34, in
rl = Readline()
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\pyreadline
lmain.py", line 422, in __init__
BaseReadline.__init__(self)
File "C:\Users\stam_\AppData\Local\Programs\Python\Python310\lib\site-packages\pyreadline
lmain.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'
Ditto for me. Very frustrating, as the video tutorial otherwise seemed so promising.
@@ericfletcher8144 It works on old python version, for example 3.7
run: python -m pip install --upgrade pyreadline3
@@arnolduk123 for me pyreadline wanst even installed so if that's also the case for you, run: pip install pyreadline3.
@@arnolduk123 legend
Thank you for this great tutorial. Works like a charm also on my RasPi400. :)
Great Tutorial....
your keyboard is great.. can you tell me with brand and model?
Gracias por compartir 👍🏻
thanks! simple and objective.
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?
Thanks for sharing. I'm surprised Rasberry Pi haven't released any integrated program to do all this (like the Arduino IDE).
There will likely be an IDE experience soon. This command line method is a good fallback and useful for programming many boards in batches - like if you're creating your own product.
@@MichaelRuppe Yes, thanks for teaching me how to do REPL and using RShell to upload files.
You can use Thing python ide
Thonny* it is pre installed on raspbain buster
Arduino has mentioned an RP2040 port is on the bake; so it shouldn't be too long until you can select from the Arduino menu Boards > RP2040 (or something to that effect). Days/weeks/months, unsure. But it's in work :)
more from this pls - thx
We're on it!
👍
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 cmdlet......."
The pip install rshell seems to work with no errors. I'm not sure what to try next.
Depending on your build, you may need to install rshell with "pip3 install rshell" instead
If you run into more issues, we can provide much better support over on our forums: forum.core-electronics.com.au/
How can I add a python module to the pico? E.G. the mpu9250
So this thing sounds like a computer more than a micro-controller.
Does this have an OS? Can it run code directly?
It's a micro-controller. Not very different from a arduino. It doesn't have an os (not what we would define as an os). It runs code that gets stored on the internal storage, or while connected to it. It can run code in either c++ or micropython. All the info about it here www.raspberrypi.org/documentation/pico/getting-started/
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?
Having tried that myself it seems the answer is no. The documentation for the Pico seems a bit thin at the moment, so it would be really useful to know what exactly is going on with that copy, and how one can emulate it without rshell. Where is the documentation that enabled the author of this video to learn how to do it?
The really odd thing is that, although file clearly persist on the Pico, they don't show up when it's mounted as a USB drive. Again, more documentation needed.
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.
pro tip: watch series at flixzone. Been using them for watching all kinds of movies lately.
@Russell Duke yea, have been watching on flixzone for since december myself :D
@Russell Duke definitely, I have been using flixzone for since november myself =)
れcp
Thank you for tech How to use rsell ! ,try RP2040 programming,
I wish these guides were on Linux or macOS! :(
I haven't done it *yet* with the pico, but rsh is pretty straightforward. Plug your pico into your Linux box, and if you don't get some type of notice of where it is, look in /var/log/messages or whatever to see what device Linux associates to it. Basically the same process as figuring out which drive is which if you have several newly connected. Once you have it, you can use rcp instead of rsh, which would be a lot fewer steps.
Quite Informative!
I was wondering though, would it not work with Thonny?
Micropython works with Thonny very well. I don't see a reason why it won't work with Pico
We have a Thonny guide coming out in the next couple of hours :) We just wanted to be sure the new public release of Thonny works the same way (pretty much does, so stay tuned!)
Forgot to link to the Thonny video :) th-cam.com/video/_ouzuI_ZPLs/w-d-xo.html
Cant seem to use the same technique in Macbook. Any person succeeded in doing this on MacOS?
In the Mac terminal type `$ ls /dev/tty.*` to find the COM port being used. It will probably come back as `/dev/tty.usbmodem000000001`. So then to connect to rshell on Mac use `$ rshell -p /dev/tty.usbmodem000000001 --buffer-size 512`. Note that's a double dash before buffer-size. Note, I didn't count how many zeros there are on usb.modem00000001 here but make sure you do. The rest is the same. Enjoy!
Also if you type `$ rshell -p /dev/tty.usbmodem000000001 --buffer-size 512 repl` you get straight into the repl to write your micropython!
Not working properly
it only works when script name is main.py
That seems right - main.py is what is "run" when MicroPython reboots.
Other file names would be useful for custom libraries and code; which could be included within main.py as needed.
@@Core-Electronics Thanks for the clarification.