How to Use VSCode with Raspberry Pi Pico W and MicroPython

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

ความคิดเห็น • 93

  • @mmshilleh
    @mmshilleh  ปีที่แล้ว +3

    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 ปีที่แล้ว +40

    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 ปีที่แล้ว

      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 11 หลายเดือนก่อน

      @@philippelouapre He did that in part 2, just recently

  • @HopWorksET
    @HopWorksET ปีที่แล้ว +4

    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  ปีที่แล้ว +1

      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!

  • @Penofhell
    @Penofhell ปีที่แล้ว +35

    Pico-W-Go is now named MicroPico

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว +4

      Thanks I will Pin this they keep changing the name for it haha

    • @MaxPanic
      @MaxPanic ปีที่แล้ว

      Thanks! Was wondering if I had the right extension.

  • @ath0rus
    @ath0rus ปีที่แล้ว +1

    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  ปีที่แล้ว

      Yes you should show everyone you know Really happy you like it, it is indeed a great way to use the Pico!

  • @paul300
    @paul300 ปีที่แล้ว +2

    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  ปีที่แล้ว +1

      I will make a 2024 update video great idea!

  • @mmshilleh
    @mmshilleh  ปีที่แล้ว +2

    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!

  • @FrankMwangi33
    @FrankMwangi33 4 หลายเดือนก่อน +1

    Thank you! Easy to follow and very straightforward.

    • @mmshilleh
      @mmshilleh  4 หลายเดือนก่อน

      Appreciate your comment! Hope you can subscribe would help me out a lot! Thanks

  • @BendsSpace
    @BendsSpace ปีที่แล้ว +3

    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 😜.

  • @arturgomboc8188
    @arturgomboc8188 6 หลายเดือนก่อน +1

    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  6 หลายเดือนก่อน

      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 6 หลายเดือนก่อน

      @@mmshilleh Micropython, can you write my question? There is an arduino code in C++, you just have to write it in micropython!

  • @jimTal001
    @jimTal001 ปีที่แล้ว +1

    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  ปีที่แล้ว

      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?

  • @chrisa4985
    @chrisa4985 ปีที่แล้ว +2

    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.

  • @JoaoFerreira-ck2ru
    @JoaoFerreira-ck2ru 11 หลายเดือนก่อน +1

    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  11 หลายเดือนก่อน

      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 11 หลายเดือนก่อน

      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

  • @regariantaring9006
    @regariantaring9006 11 หลายเดือนก่อน +1

    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  11 หลายเดือนก่อน

      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

  • @surfbort
    @surfbort ปีที่แล้ว +1

    Thanks mate made getting started with micropython on my RP2040-Touch-LCD-1.28 very easy!

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว

      I am happy to hear that, I hope you can subscribe for more!

  • @pavelperina7629
    @pavelperina7629 หลายเดือนก่อน +1

    As of today, I'm not sure if MicroPico supports Linux and Pico2 - i cannot create project, but I can upload a single file. Now I found out there is official "Raspberry Pi Pico" extension that seem to support both MicroPython and C++.

    • @mmshilleh
      @mmshilleh  หลายเดือนก่อน

      Thanks for letting me know I will look into this and make another video if need be

  • @nickk48
    @nickk48 ปีที่แล้ว +1

    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

  • @Charlotte-jm2hj
    @Charlotte-jm2hj 11 หลายเดือนก่อน +1

    Can you with this plugging use Raspberry pi Pico to fake a mouseclicked ?

    • @mmshilleh
      @mmshilleh  11 หลายเดือนก่อน

      Hahahah I am sure you can there are examples of that online. Probably not something I would show on my channel mate :)

  • @jazzmannorman
    @jazzmannorman ปีที่แล้ว +1

    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  ปีที่แล้ว

      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 ปีที่แล้ว

      @@mmshilleh Ah that's a shame. Thanks anyway

  • @SSidewaySS
    @SSidewaySS ปีที่แล้ว +1

    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  ปีที่แล้ว +1

      Do you have Python 3.9 or above?

    • @SSidewaySS
      @SSidewaySS ปีที่แล้ว +1

      @@mmshilleh Yes, I have 3.11.4

    • @Dylanos
      @Dylanos ปีที่แล้ว +1

      Same issue here. Trying to find a solution.. Setting the path manually in the settings doesn't seem to make a difference.

  • @reinaldomenendez7593
    @reinaldomenendez7593 ปีที่แล้ว +1

    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  ปีที่แล้ว

      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!

  • @mathiskumar1472
    @mathiskumar1472 ปีที่แล้ว +1

    How to connect raspberry pi pico w to (bluetooth camera or wifi camera)

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว +1

      Will consider this for sure!

    • @mathiskumar1472
      @mathiskumar1472 ปีที่แล้ว

      I am waiting for video

    • @mathiskumar1472
      @mathiskumar1472 ปีที่แล้ว +1

      Need for college project, so u post video this week my team move forward easily, next month sem exam also

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว +1

      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!

  • @jbelmont72
    @jbelmont72 ปีที่แล้ว

    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  ปีที่แล้ว

      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 ปีที่แล้ว +1

      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  ปีที่แล้ว

      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

  • @OrangesLmao
    @OrangesLmao ปีที่แล้ว +1

    Can this tutorial also be used to code a normal raspberry pi pico?

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว +1

      Yes most definitely

    • @OrangesLmao
      @OrangesLmao ปีที่แล้ว

      @@mmshilleh Great, thanks!

  • @edn8539
    @edn8539 2 หลายเดือนก่อน +1

    Great staff thanks for sharing

    • @mmshilleh
      @mmshilleh  2 หลายเดือนก่อน +1

      Haha, I am the only staff but thank you don't forget to subscribe

  • @gautombose4172
    @gautombose4172 ปีที่แล้ว +1

    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)

  • @lithiraaponsu6063
    @lithiraaponsu6063 ปีที่แล้ว +1

    with new 3.0 update, this didn't work to me. Any solution?

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว +1

      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 ปีที่แล้ว

      @@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 ปีที่แล้ว

      @@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.

  • @MatthiasHeiß
    @MatthiasHeiß ปีที่แล้ว +2

    Thanks for this tutorial!

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว

      Anytime ;) dont forget to subscribe

  • @IsaacSneyder
    @IsaacSneyder 10 หลายเดือนก่อน +1

    Works for me. Thank you!

    • @mmshilleh
      @mmshilleh  10 หลายเดือนก่อน

      You're welcome! Please subscribe to the channel if you enjoyed it!

  • @dancingrook8553
    @dancingrook8553 7 หลายเดือนก่อน +1

    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  7 หลายเดือนก่อน

      Happy to help! Hope you can subscribe :)

  • @thespacecowboy420
    @thespacecowboy420 ปีที่แล้ว

    how to upload?? why it doesn't start itself???

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว

      Can start itself if you upload it to main.py

    • @thespacecowboy420
      @thespacecowboy420 ปีที่แล้ว +1

      I got it now of course it does but not when connected, thank you @@mmshilleh

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว

      @@thespacecowboy420 happy it works hope you can subscribe always willing to help!

  • @justineno4254
    @justineno4254 7 หลายเดือนก่อน +1

    Very helpful. Thank you.

    • @mmshilleh
      @mmshilleh  7 หลายเดือนก่อน

      Glad it was helpful! Hope I earned your subscription to the channel , would help me out a lot!

  • @ender_relics
    @ender_relics ปีที่แล้ว +2

    thanks, it i exactly what i looking for

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว

      Your comment is highly appreciated thank you

  • @jimTal001
    @jimTal001 ปีที่แล้ว +1

    I was able to simply save a main.py file to the pico and it runs automatically now. Thanks

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว

      That is great news, hope you can stay tuned to the future content!

  • @cotyhamilton
    @cotyhamilton ปีที่แล้ว +1

    thank you!

    • @mmshilleh
      @mmshilleh  ปีที่แล้ว

      Happy you liked it, do not forget to smash that subscribe button!

  • @-blackcat-4749
    @-blackcat-4749 ปีที่แล้ว +1

    The mentioned act is simple. It existed 📙

    • @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 ปีที่แล้ว

      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

  • @thespacecowboy420
    @thespacecowboy420 ปีที่แล้ว +1

    thanks