Тёмный

How to Use VSCode with Raspberry Pi Pico W and MicroPython 

Shilleh
Подписаться 3,7 тыс.
Просмотров 47 тыс.
50% 1

Learn how to get set up and start writing code in MicroPython using VSCode (Visual Studio Code). This can have many benefits over coding in Thonny which is notoriously a buggy IDE.
Link to Medium Article:
/ how-to-use-vscode-with...
Link to Blog Post:
shillehtek.com/blogs/news/how...
Other IDE Tutorials:
How to Use PyCharm with Pico: • How to Use PyCharm wit...
How to Use Arduino IDE with Pico: • How to Use Arduino IDE...
How to Run Scripts without an IDE:
• How to Run Code & Mana...
TIMESTAMPS
00:00 Intro
00:45 Install MicroPython
02:20 Pico-W-Go Extension Walkthrough
06:03 Outro

Наука

Опубликовано:

 

6 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 90   
@mmshilleh
@mmshilleh 8 месяцев назад
Consider joining a membership on the channel to obtain more perks to help you with your IoT and software journey and to support the channel! We have three levels. 🥰
@danahuff6823
@danahuff6823 Год назад
The newest version of Pico-W-Go, now renamed MicroPico, includes the ability to display the file system on the Pico. Now I feel comfortable moving from Thonny to VSC.
@mmshilleh
@mmshilleh Год назад
This is great news yeah I will probably do the same at this point.
@philippelouapre
@philippelouapre 8 месяцев назад
Hi. Could you please provide the way to display the file system on the pico through VSCode? I do not see the solution. Thanks!
@brianlmerritt
@brianlmerritt 7 месяцев назад
@@philippelouapre He did that in part 2, just recently
@Penofhell
@Penofhell Год назад
Pico-W-Go is now named MicroPico
@mmshilleh
@mmshilleh Год назад
Thanks I will Pin this they keep changing the name for it haha
@MaxPanic
@MaxPanic 11 месяцев назад
Thanks! Was wondering if I had the right extension.
@HopWorksET
@HopWorksET Год назад
Another well made fast video to get you started with this device and VSC!! What is amazing is the videos you put out already are right down the path I am following! For example, I got a MPU4060 and a GPS module for my car computer and sure enough, you have a few videos on it! Then next, I wanted to code for my whole project using VSC, including the RPI Pico W, and here I am! ONE THING WORTH NOTING - I got errors when I tried to use the extension. I actually had Pico-Go still installed and it does NOT play nice with Pico-W-Go. So check if you have Pico-Go and either disable or uninstall it before installing the newer version. THANKS AGAIN Shilleh for the VERY useful contribution!! {already-subscribed.liked.saved}
@mmshilleh
@mmshilleh Год назад
Wow, that truly means a lot. Yeah, the premise of this channel is to show things that were initially hard for me to figure out online. Really glad it is paying off and helping people honestly, so thanks a lot. Hope to make more Raspberry Pi content when I get back to America in a few weeks!
@BendsSpace
@BendsSpace Год назад
Great tutorial! I really appreciate you making this, I found it very helpful :)
@mmshilleh
@mmshilleh Год назад
Wow that means a lot yeah helped a lot more people than I thought it would tbh 😜.
@ath0rus
@ath0rus 9 месяцев назад
I find this the best way to use a pi pico and the setup is very well explained, I think my pi friends will love this. I got 2x pico's (Pico H and Pico WH) to try and see how they work plus be a gpio for my desktop or laptop
@mmshilleh
@mmshilleh 9 месяцев назад
Yes you should show everyone you know Really happy you like it, it is indeed a great way to use the Pico!
@FrankMwangi33
@FrankMwangi33 2 часа назад
Thank you! Easy to follow and very straightforward.
@user-rk3wu3lk7t
@user-rk3wu3lk7t Год назад
Thanks for this tutorial!
@mmshilleh
@mmshilleh Год назад
Anytime ;) dont forget to subscribe
@surfbort
@surfbort 7 месяцев назад
Thanks mate made getting started with micropython on my RP2040-Touch-LCD-1.28 very easy!
@mmshilleh
@mmshilleh 7 месяцев назад
I am happy to hear that, I hope you can subscribe for more!
@ender_relics
@ender_relics Год назад
thanks, it i exactly what i looking for
@mmshilleh
@mmshilleh Год назад
Your comment is highly appreciated thank you
@user-hs2nm8tf2d
@user-hs2nm8tf2d 6 месяцев назад
Works for me. Thank you!
@mmshilleh
@mmshilleh 6 месяцев назад
You're welcome! Please subscribe to the channel if you enjoyed it!
@justineno4254
@justineno4254 3 месяца назад
Very helpful. Thank you.
@mmshilleh
@mmshilleh 3 месяца назад
Glad it was helpful! Hope I earned your subscription to the channel , would help me out a lot!
@Mr.FarePlay
@Mr.FarePlay Год назад
You reduced my installation time from a whole day to 6 minutes 😂 i thank you kind sir 👍❤️
@mmshilleh
@mmshilleh Год назад
I appreciate your comment a lot! Means a lot that I am saving other Engineers and students a lot of time. I will continue to make my content around helping you all to get started quickly !
@dancingrook8553
@dancingrook8553 2 месяца назад
Thank you, I like VSCode and when I first saw Thonny I thought nup I'm finding out how to do this in VSCode.....so yeah thank you
@mmshilleh
@mmshilleh 2 месяца назад
Happy to help! Hope you can subscribe :)
@mmshilleh
@mmshilleh Год назад
If this helped you please consider supporting the channel at www.buymeacoffee.com/mmshilleh or if you want to book a chat with me. Please remember to sub to the channel if you have not, would be highly appreciated! Thanks!
@cotyhamilton
@cotyhamilton Год назад
thank you!
@mmshilleh
@mmshilleh Год назад
Happy you liked it, do not forget to smash that subscribe button!
@reinaldomenendez7593
@reinaldomenendez7593 9 месяцев назад
Great video. You saved me after 2h of trying. One question, how do I make this file consistent in my pico? I mean, I want that LED blinks every time I disconnetc/connect it again
@mmshilleh
@mmshilleh 9 месяцев назад
Thats a good question, to make a code instantly activate upon power up you can add the code to the main.py file of the home directory on your Pico. This is the file the Pico tries to execute upon turning on. Hope that answers your question and you subscribe!
@jimTal001
@jimTal001 7 месяцев назад
Thank you for the great work. You stated that the main.py file located in the home directory of the pico needs to be edited for code to be persistent. How does one access the home folder on the pico? Thanks
@mmshilleh
@mmshilleh 7 месяцев назад
Jim great question, sometimes I skim over details and I forget what people need. To access the home directory on the Pico W in VSCode you can just upload a regular Python file. If you start uploading folders that is when you start creating other directories. So in its base form, you are already uploading to the home directory on the Pico W using this plugin. My terminology may have confused you. Does this make sense?
@jazzmannorman
@jazzmannorman 10 месяцев назад
Hi! Thanks for the tutorial. It was super easy to follow. Can I ask, is there any way to manage packages using micropico, akin to Tools --> Manage Packages in Thonny? Thanks again
@mmshilleh
@mmshilleh 10 месяцев назад
Great question, there is not, if you want any libraries you would have to download the library folders for that project from Github and move them into the lib folder on your Pico. Either way, the library manager in Thonny was not very robust either. Hope that helps and do not forget to subscribe ;)
@jazzmannorman
@jazzmannorman 10 месяцев назад
@@mmshilleh Ah that's a shame. Thanks anyway
@jbelmont72
@jbelmont72 8 месяцев назад
Great video and teaching. You made it look easy AND it worked. Question- I read your answer about adding libraries from GitHub straight onto the pico. You mentioned a “lib” folder. Do we make a folder in a text editor, then put a library like BME280 into it and download prior to adding the firmware onto the pico?
@mmshilleh
@mmshilleh 8 месяцев назад
I appreciate your positive feedback; it is part of the reason that keeps me producing videos. To answer your question, no you do not make the lib folder prior, in fact you make it once you have the full setup. You can create a folder called "lib" in your project before you upload the project to the pico. You can add subfolders of libraries you download from GitHub into the lib folder. So if you want the bme280 library you would place it in the lib folder and then upload the project. If you are still having issues I will gladly make a follow up video for you because I am sure others may have the same concern. Thanks buddy.
@jbelmont72
@jbelmont72 8 месяцев назад
Awesome response. I am working on learning the basics of git and maybe that will help me figure how to get the library from GitHub to a file in my folder that I can name "lib" but honestly, I don't see how to make the jump. A tutorial on the subject would be welcomed (even lovingly embraced).
@mmshilleh
@mmshilleh 8 месяцев назад
I will work on that soon, good idea! And welcome to the programming world git was incredibly intimidating for me at first now I use it everyday like writing my name haha@@jbelmont72
@chrisa4985
@chrisa4985 Год назад
Followed your steps, but my VS says "Pico Connected", not Pico W, down the bottom on the blue bar. And when I try right-clicking on the Blink-Sketch file, to select 'Pico-W-Go > Run current file', that's greyed out. Can't use that. Any ideas?
@mmshilleh
@mmshilleh Год назад
Hey Chris, did you download the latest version of MicroPython for the Pico W and port it over. Also, be sure to check your python version and see if it is 3.9 or greater. Type in python --version or python3 --version in the command line in VSCode. Another thing I would try if that does not work is to check if your USB cable is the proper USB cable. See if you can connect in Thonny which is more straightforward. If you are new to the Raspberry Pi Pico it may be you have the wrong type of USB cable. Not all cables transfer data.
@thespacecowboy420
@thespacecowboy420 7 месяцев назад
thanks
@nickk48
@nickk48 Год назад
I installed Pico-W-Go on VS Code, I have Python 3.9+ on my PC. I have microPython on my board and it works with Thonny. The issue now is, apparently there are several more extensions required to make this thing work. I don't know the equivalent of Command-Shift-P in Windows 11. Is this something that works within the environment of VS Code or is it installed like any other app? I don't show any connection or opportunity to connect in the lower right. I'm hoping that "Configure Project" thing might be the key to all this, but don't know how to run it.
@mmshilleh
@mmshilleh Год назад
The equivalent should be Control + Shift + P. This works within the environment of VSCode for sure. This is called the "Command Palette" in VSCode and it is a common thing to use in such an IDE. You can try to redownload the latest version of MicroPython and reboot it again. Let me know
@gautombose4172
@gautombose4172 Год назад
Excellent Video. H. How do you single step and debug Pyton Code running in Pico using VSCode ?
@mmshilleh
@mmshilleh Год назад
Thank you Gautom. I believe you cannot step through code with this extension. If anyone wants to correct me if I am wrong. I would simply debug with the console logging (print statements)
@paul300
@paul300 7 месяцев назад
Have you considered making an update of this video will all the new stuff you can now do with MicroPico and the remote filesystem kind of stuff
@mmshilleh
@mmshilleh 7 месяцев назад
I will make a 2024 update video great idea!
@arturgomboc8188
@arturgomboc8188 Месяц назад
Nice work! Could you help me? Chinese calliper data reading pi pico micropyton is the few lines of code that do this! Unfortunately, I couldn't find a sample example of such a thing anywhere!
@mmshilleh
@mmshilleh Месяц назад
I help people on projects but typically I charge a small consulting fee. You can see more on my link buymeacoffee.com/mmshilleh Let me know if interested :)
@arturgomboc8188
@arturgomboc8188 Месяц назад
@@mmshilleh Micropython, can you write my question? There is an arduino code in C++, you just have to write it in micropython!
@regariantaring9006
@regariantaring9006 7 месяцев назад
anyone can tell me how to "upload" program to pico using this method? i already try the example code (blink led) and try to "Run current file on pico" --> it's work, but not permanent uploaded, when i try to "upload project to pico" ---> nothing happened, is there something wrong?
@mmshilleh
@mmshilleh 7 месяцев назад
If you want to upload a whole project and run a file after upload, the code that you want to run has to be in the main.py file for the Pico W to know what code to execute upon booting up. VSCode plugin has its flaws indeed. Nothing is wrong, it is just the way the plugin works
@JoaoFerreira-ck2ru
@JoaoFerreira-ck2ru 6 месяцев назад
hey great tutorial, but i am having an issue. everytime i write the code onto the pico trough REPL it all works fine on vsCode, but wheni try to write a .py file and try to run it on the pico i always get my pico disconnected and the error "Exception occured (maybe a connection loss)". does anyone know how to solve this I am on windows 10
@mmshilleh
@mmshilleh 6 месяцев назад
Hey Joao, never seen that error. Do you get the same error in Thonny? You should try that first. If you do it could simply mean an issue in your wiring or Pico. Sorry about that mate
@JoaoFerreira-ck2ru
@JoaoFerreira-ck2ru 6 месяцев назад
Its all ok in thonny aswell as the pico i have tried in both picos i have and they work well with thonny, they both work well with repl in vscode but everytime i try to run the code on pico in vscode with micropico it disconnects
@Charlotte-jm2hj
@Charlotte-jm2hj 7 месяцев назад
Can you with this plugging use Raspberry pi Pico to fake a mouseclicked ?
@mmshilleh
@mmshilleh 7 месяцев назад
Hahahah I am sure you can there are examples of that online. Probably not something I would show on my channel mate :)
@SSidewaySS
@SSidewaySS Год назад
I followed everything step by step but when I try to configure the Pico W it says "Activating Extensions..." on the bottom but then nothing happens. What can I do?
@mmshilleh
@mmshilleh Год назад
Do you have Python 3.9 or above?
@SSidewaySS
@SSidewaySS Год назад
@@mmshilleh Yes, I have 3.11.4
@Dylanos
@Dylanos 11 месяцев назад
Same issue here. Trying to find a solution.. Setting the path manually in the settings doesn't seem to make a difference.
@OrangesLmao
@OrangesLmao Год назад
Can this tutorial also be used to code a normal raspberry pi pico?
@mmshilleh
@mmshilleh Год назад
Yes most definitely
@OrangesLmao
@OrangesLmao Год назад
@@mmshilleh Great, thanks!
@mathiskumar1472
@mathiskumar1472 Год назад
How to connect raspberry pi pico w to (bluetooth camera or wifi camera)
@mmshilleh
@mmshilleh Год назад
Will consider this for sure!
@mathiskumar1472
@mathiskumar1472 11 месяцев назад
I am waiting for video
@mathiskumar1472
@mathiskumar1472 11 месяцев назад
Need for college project, so u post video this week my team move forward easily, next month sem exam also
@mmshilleh
@mmshilleh 11 месяцев назад
Hello Mathis, I have not yet to order the camera to do this yet. Sorry about your deadline but even if I ordered it right now I would not have time to construct the video and post it in time!
@jimTal001
@jimTal001 7 месяцев назад
I was able to simply save a main.py file to the pico and it runs automatically now. Thanks
@mmshilleh
@mmshilleh 7 месяцев назад
That is great news, hope you can stay tuned to the future content!
@lithiraaponsu6063
@lithiraaponsu6063 Год назад
with new 3.0 update, this didn't work to me. Any solution?
@mmshilleh
@mmshilleh Год назад
Is there an error message? What is the exact issue?
@nickk48
@nickk48 Год назад
Thanks for the quick demo. I’m going to try it again after no luck the first time. But … an 85 MB text editor without a bookmark function?
@danesparza77
@danesparza77 11 месяцев назад
@@nickk48 A bit more context about a bookmark function would be useful. As a developer of 25+ years (who has worked with 10+ languages) I have no idea what you're talking about.
@nickk48
@nickk48 11 месяцев назад
@@danesparza77 OK. Some program text editors have a bookmark function which is handy for jumping between different spots in the file. I've been using Notepad++ which uses control-F2 to toggle a bookmark at the cursor location and F2 to go to the next bookmark, etc. I see that Microsoft Word also has a bookmark function, although I wouldn't use it for a program text editor. Congratulations on your 25+ years in software development and 10+ languages mastered.
@thespacecowboy420
@thespacecowboy420 7 месяцев назад
how to upload?? why it doesn't start itself???
@mmshilleh
@mmshilleh 7 месяцев назад
Can start itself if you upload it to main.py
@thespacecowboy420
@thespacecowboy420 7 месяцев назад
I got it now of course it does but not when connected, thank you @@mmshilleh
@mmshilleh
@mmshilleh 7 месяцев назад
@@thespacecowboy420 happy it works hope you can subscribe always willing to help!
@-blackcat-4749
@-blackcat-4749 Год назад
Each 📖 act is ordinary. This took place
@mmshilleh
@mmshilleh Год назад
Not sure to be honest. I do not have that folder on my version. What are the sub-directories? Have you looked inside deeply?
@paul300
@paul300 7 месяцев назад
It's the remote workspace showing you the files that are on your Pico. I guess you can work in this folder like normally but it directly saves your stuff on the Pico
Далее
Programming a Raspberry Pi Pico with C or C++
19:47
Просмотров 107 тыс.
Я НЕ ОЖИДАЛ ЭТОГО!!! #Shorts #Глент
00:19
Это iPhone 16
00:52
Просмотров 1,1 млн
Наташа Кампуш. 3096 дней в плену.
00:58
🤯️ Vini Jr. ✖️ Brahim 🤯
00:13
Просмотров 3,8 млн
I Can Save You Money! - Raspberry Pi Alternatives
15:04
Why Are Open Source Alternatives So Bad?
13:06
Просмотров 591 тыс.
The Raspberry Pi Pico WAS Overrated! But that changed!
10:18
How Google's Chromium Took Over the Browser World
9:59
КРАХ WINDOWS 19 ИЮЛЯ 2024 | ОБЪЯСНЯЕМ
10:04
Проверил, как вам?
0:58
Просмотров 390 тыс.