Trying (and failing) to use VS Code with Pybricks, EV3, and USB #2841
SubatomicPlanets
started this conversation in
General
Replies: 1 comment 1 reply
|
Thanks for the glowing review 😄 We're working on a command line tool to replace Pybricksdev. This will also support EV3 in USB mode. Please stay tuned! |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I learned more about Mindstorms over the past week. I haven't used it in a while, and wow, this thing is really amazing! I had a really cool project idea and started working on it using Pybricks 2.0 since it's still the official stable version. My project benefits from performance a lot, so when I learned about the bare metal Pybricks version for EV3, I got really excited!
I normally use Firefox, so I downloaded Chrome (and changed a lot of privacy settings) and installed the pybricks beta firmware, and boy am I impressed by those boot times! The web interface worked perfectly, but I wanted to use VS Code, so I set up a venv and ran
pip install pybricksandpip install pybricksdev.I want to use USB, not Bluetooth, but I can't get it to work. The first issue I encountered was an error about the USB backend not being available. After trying some stuff out, I managed to get it working by doing
pip install libusband copying its Windows x64 dll into the venv/Scripts directory. This way the Python executable can find it. When I ran it again, it just said "Pybricks Hub not found." which makes sense because I haven't connected it yet. So I connected it and ran it once more. This time it failed with this:This suggests it did indeed find the EV3 but couldn't connect for some reason. I spent the next few hours learning more about Pybricks, USB, and EV3. As far as I'm aware, there are two USB "modes" which also have different drivers. One is a basic serial communication, and the other is more sophisticated and called WinUSB on Windows... So are there some incompatibilities here anywhere? Is it not possible yet to use pybricksdev with EV3 and USB? And if it is possible, then what did I do wrong?
Also, just for your information, my project uses 2 sensors and 2 motors, and the Python file is currently around 200 lines long. As I said earlier, I initially worked with Pybricks 2.0. Well, the good news is that everything works properly (except for this one small issue that I reported), and it runs the same way as the old version, just way faster! So this new Pybricks EV3 version seems to be pretty far in development! Just out of interest, do you guys have any time estimate for when it no longer counts as beta?
I also wanted to say thank you to all the people who made this project possible! This is one of the nicest open source projects I've seen! No AI slop, good documentation, massive compatibility, extremely user-friendly API, the list goes on and on! I'd really love to contribute some code if I have enough time (no promises). I'm pretty "fluent" in Python but have done some lower level stuff over the years too. So if you have any suggestions for small open issues, or if there is some small Pybricks project structure overview, I'd be happy to take a look!
Thanks!
All reactions