VSCode Extension for Raspberry Pi Pico 1 & 2 | DrJonea.co.uk

  Рет қаралды 4,952

Dr Jon EA Ltd

Dr Jon EA Ltd

Күн бұрын

This video is sponsored by PCBWay (www.pcbway.com/)
The new VSCode Extension for the Raspberry PI Pico is the fastest way to get a working toolchain and build C/C++ projects for the Pico. Going from trivial to real projects isn’t as simple as you might think though. In this video I investigate Please visit my website to get more information: drjonea.co.uk/
VSCode is a common IDE available here: code.visualstu...
The extension from the Pico can be found in the extensions catalogue.
My repo containing the demonstration application can be found here: github.com/jon...
Sponsor: PCBWay: www.pcbway.com/ PCB prototyping, assembly, 3D printing, CNC, sheet metal fabrication, and injection molding.
⏰Timestamps
00:00 Introduction
01:56 SDK Journey
03:10 PCBWay
03:50 VSCode
06:15 Pico Extension
10:55 Real Projects
15:45 Debug and Serial Terminal
17:15 Summary
Get more out of the Raspberry Pi Pico and Pico 2. Subscribe for more Python and C++ programming tips and tricks, like if you found this video helpful, and comment below with your thoughts or questions. Follow us on social media for the latest updates and exciting content!
💁‍♂️If you like the video remember you can leave me a tip with the Super Thanks button. Or via PayPal: paypal.me/DrJonEA or Revolut: checkout.revol...
Video Title: Weather Station A Raspberry Pi Pico W Project
🔔Build, Code, Create - Your Pathway to Innovation Starts Here!! Subscribe now and unlock the power of Raspberry PI Pico for your Embedded IoT and Robotics projects.
/ @drjonea
✅Important Link to Follow
🔗GitHub
github.com/jon...
✅ Stay Connected With Me.
👉Facebook: / drjondurrant
👉Instagram: / drjonea
👉Threads: www.threads.ne...
👉Tiktok: / drjonea
👉Twitter (X): / drjonea
👉Linkedin: / jondurrant
👉Pinterest: www.pinterest....
👉Discord (DevEco channel): mee6.xyz/i/YJf...
👉Website: drjonea.co.uk/
✅ For Business Inquiries: drjonea@jondurrant.com
=============================
✅ Recommended Playlists
👉 RP2040 Guides
• Raspberry PI Pico-W WI...
✅ Other Videos You Might Be Interested In Watching:
👉 Tutorial using PWM on Raspberry PI Pico to Dim/Fade an LED in C/C++
• Tutorial using PWM on ...
👉 How to Use a Servo Feedback Hack with Raspberry PI Pico to Measure Angle
• How to Use a Servo Fee...
👉 Driving Servo from Raspberry PI Pico
• Driving Servo from Ras...
=============================
✅ About Dr Jon EA Ltd.
Welcome to Dr Jon EA Ltd, your go-to channel for mastering Embedded Systems, IoT, and Robotics with the Raspberry PI Pico and beyond! Get into my hands-on tutorials and courses, created by me, Dr. Jon EA - a Udemy training author, enterprise architect, and passionate hobby developer based in Brighton, UK. Whether you're getting into coding with C, C++, or Python or exploring FreeRTOS, this channel is crafted to elevate your skills in a simple, accessible way. Join me on this journey of creation and innovation today!
For Collaboration and Business inquiries, please use the contact information below:
📩 Email: drjonea@jondurrant.com
🔔Elevate Your Coding Skills to New Heights! Subscribe now and get on a learning journey with Raspberry PI Pico tutorials that make complex concepts simple.
/ @drjonea
=================================
⚠️Disclaimer: I do not accept any liability for any loss or damage incurred from you acting or not acting as a result of watching any of my publications. You acknowledge that you use the information I provide at your own risk. Do your research.
Copyright Notice: This video and my KZbin channel contain dialogue, music, and images that are the property of Dr Jon EA Ltd. You are authorised to share the video link and channel and embed this video in your website or others as long as a link back to my KZbin channel is provided.
© Dr Jon EA Ltd

Пікірлер: 31
@john_hind
@john_hind 3 ай бұрын
You can of course open terminals within VS Code and you can also move any VS Code tab into its own window (right click on the tab). You need a recent version to be able to move terminal tabs into their own windows.
@DrJonEA
@DrJonEA 3 ай бұрын
Good tips, thanks
@ChromaticReflection
@ChromaticReflection 3 ай бұрын
Jon, good video. Thanks for the effort to create it. It would be great if you could make a follow up vid where you delve into config of a more complex project like you highlighted. IMO, examples/tutorials of this are sorely lacking by Rpi and makes there extension just a “first program hobby tool” at this point. We are all left to sort through trying to mod the Cmake file from the project start Cmake. Right now it seems a bit clumsy. Any insight you could offer here would be greatly appreciated.
@DrJonEA
@DrJonEA 3 ай бұрын
Thank you. I agree with your content and I will see what I can do.
@ChromaticReflection
@ChromaticReflection 3 ай бұрын
@@DrJonEA Thanks!
@danman32
@danman32 3 ай бұрын
The Pico extension sounds like it takes too much control, though it sounds like it has the benefit of automatically installing any dependencies. I know at one time RP had an installer for windows that would install everything including the SDK, VSCode and needed extensions (really only cmake). You did have to launch vscode from the shortcut RP install provided so that the environment variables would be set for the session. As for flashing through USB, I'm surprised the Pico extension doesn't take advantage of picotool which can put the Pico in bootsel mode without having to touch the bootsel button. I use the picotool all the time when I update the Pico controlled 16x300 ws2812b sign with a new message. What I have to learn is how to deal with cmake files. Too often VSCode says an import file can't be found if the cmake isn't quite right.
@DrJonEA
@DrJonEA 3 ай бұрын
Thanks. Yes the windows installer was great, have the author as a guest on a future video. I do think great structured cmake files are basis of a stable project.
@AstonJay
@AstonJay 26 күн бұрын
I clicked on the "flash (SWD)" button but got an OpenOCD error of some kind. I'm scared that I might damage or brick the chip. Also, could it be that I haven't "configured" the cmake extension as you did in the video? Because the official documentation on the pico extension says that we should ignore any cmake pop-ups, which I did and now it doesn't work. To add context, the "Run" option works perfectly, but the pico does not run the program after the power was disconnected and reapplied. It seems that only this "Flash" option doesn't work.
@DrJonEA
@DrJonEA 26 күн бұрын
Hi @AshtonJay, Firstly don't worry too much about damaging or bricking the Pico. It is quite unusual to damage these devices in normal operation. In 5 years I've only bricked one unit and that was me making a mistake with how power was applied. The code on these devices almost always runs from Flash (you can load code into RAM only but it is quite technical operation and not something you would have done). So if the code is running you have managed to flash the device. Why it doesn't run again on power cycling is confusion, and I can answer that from the information you have given. In terms of flashing there are two approaches to that. What we call bootsel where you hold down the button on the Pico why you connect the USB cable and the Pico becomes a USB Drive to load the UF2 file on. Plus SWD which use OpenOCD to flash the Pico but requires an adapter board normally the Raspberry Pi Debug Probe. On the channel my videos are very specific into single area rather than a learning course. Some videos are beginner level and others more advanced. You might do better looking at my beginner course on Udemy for how to get going with the Pico in C/C++ www.udemy.com/course/introduction-to-c-development-environment-for-raspberry-pico/?referralCode=875319E04F95C9EC3414
@spillagonner
@spillagonner Ай бұрын
In the CMakeLists.txt file in the top level directory, on line 7 you have 'set(sdkVersion 2.1.0)'. Then, on line 22, you have 'set(sdkVersion 2.0.0)'. You also make changes to the toolchain version. ??
@DrJonEA
@DrJonEA Ай бұрын
That doesn't sound right does it. I suspect auto changes to the CMakelist file by the Pico extension. I'll have another look at those examples.
@spillagonner
@spillagonner Ай бұрын
After editing the top level CMakeLists.txt file to reference sdkVersion 2.1.0 and toolchainVersion 13_3_Rel1, the build completed successfully.
@DrJonEA
@DrJonEA Ай бұрын
Oh well done. I'll update the repo when I get a chance.
@spillagonner
@spillagonner Ай бұрын
@@DrJonEA Please note that I have sdk 2.1.0 and toolchain 13_3_Rel1 installed. Others may be working from other versions.
@jakub9814
@jakub9814 Ай бұрын
How can I import library from github and use it for my rpi pico program with VScode? In Arduino IDE it's simple, you can download zip file and arduino software does everything, but I dont know how can i do the same thing in vscode
@DrJonEA
@DrJonEA Ай бұрын
From build point of view a library is just a collection of files. So many ways to download and put the files in an appropriate folder, before editing the cmakefilss to include. If you want to build projects that use github and link libraries as submodles, I would suggest looking at one of the submodules tutorials.
@HendersonHood
@HendersonHood 27 күн бұрын
This video probably has the wrong Title? Newbies probably just want clear instructions on how to install and use the extension. Dealing with the extention's incapabilities is probably worth another separate video.
@DrJonEA
@DrJonEA 27 күн бұрын
Thanks for the feedback. I wasn't trying to mislead, just guide away from some issues.
@remotepinecone
@remotepinecone 15 күн бұрын
in vs code eventually I open a terminal and start coding in my text cli editor
@DrJonEA
@DrJonEA 15 күн бұрын
Lol, I can appreciate that
@dennissdigitaldump8619
@dennissdigitaldump8619 Ай бұрын
Oddly I could never get the pi-pico SDK to work on windows. Only on Linux would it get all the way to the drag and drop final file format.
@DrJonEA
@DrJonEA Ай бұрын
That is odd. I know lots of people who do use Windows for Pico development. Though personally I use Mac and Linux.
@spillagonner
@spillagonner Ай бұрын
Following your instructions, when I execute CMakePanel:PinnedCommands:Task:CMake:Build I get an error 'could not find CMAKE_PROJECT_NAME ic Cache'
@DrJonEA
@DrJonEA Ай бұрын
I'm really sorry it didn't work for you. Not sure I understand that error either. As if the project name has not been registered in the cmake file....
@spillagonner
@spillagonner Ай бұрын
@@DrJonEA Yes, the docs for cmake say it should get inherited from the project() declaration in the CMakeLists.txt from the superior folder.
@boredcompsciguy
@boredcompsciguy Ай бұрын
Thanks for this content. They really need to bring back the Windows installer. Upgrading to the 2.0 version broke everything I was working on and I had to spend hours figuring out what I needed to continue building from the command line with not even an ounce of instructions from the Pi Foundation. Even worse is that the SDK install instructions for Windows in their readme on github is just "get the vscode extension". I would be okay with using the (forced) extension but mine will not import any work. It's great for creating new projects and getting all of the configuration set up right from the start, but if I ever wish to continue old work, the import will fail. Either silently, or after attempting to re-download the entire SDK, CMake, and other dependencies when they're all installed, and correctly set in the system path. It's a little upsetting that the Pico 2 is this good, the API documentation is top tier, but the user experience is still...not there yet. I will just continue making "new" projects and pasting my previous work in until they resolve whatever's going on there.
@DrJonEA
@DrJonEA Ай бұрын
I hear you pain. Keep an eye here for a 2.1 SDK installer for windows: github.com/ndabas/pico-setup-windows
@alevans51
@alevans51 3 ай бұрын
Agree. Using VS Code for a Pico is far from practical.
@DrJonEA
@DrJonEA 3 ай бұрын
Thank you. I am not quite sure I would be that harsh but yes it isn't as easy as Raspberry PI make it look for real world projects.
@TooSlowTube
@TooSlowTube 2 ай бұрын
Have you tried the Arduino IDE, with Earle Philhower's arduino-pico core? It seems a lot simpler than trying to use VSCode, to me.
@DrJonEA
@DrJonEA 2 ай бұрын
Yes I've used the Arduino IDE in the past. It is absolutely a great starting point and really helps get people into the microros space. It isn't right for my usage though.
How to run Mongoose Web Server on Raspberry PI Pico 2 W
23:50
Dr Jon EA Ltd
Рет қаралды 1,6 М.
If Your Hair is Super Long
00:53
im_siowei
Рет қаралды 30 МЛН
It's the natural ones that are the most beautiful#Harley Quinn #joker
01:00
Harley Quinn with the Joker
Рет қаралды 22 МЛН
When my son wants to eat KFC #shorts #trending
00:46
BANKII
Рет қаралды 27 МЛН
Raspberry Pi  Pico PIO  - 8 Little Processors You Can Program
31:55
Gary Explains
Рет қаралды 96 М.
How to get started with Pico and Pico 2
12:57
Dr Jon EA Ltd
Рет қаралды 727
Building a $14 Macintosh
13:34
Action Retro
Рет қаралды 100 М.
Turn your Pico into a 400MHz 24 Channel Logic Analyser
25:26
Happy Little Diodes
Рет қаралды 77 М.
Raspberry Pi Pico LCD Projects
17:25
ExplainingComputers
Рет қаралды 128 М.
Raspberry Pi Pico 2: a RISC-V bet!
8:05
Jeff Geerling
Рет қаралды 319 М.
The Raspberry Pi Pico WAS Overrated! But that changed!
10:18
GreatScott!
Рет қаралды 629 М.
Жесткие тесты дронов DJI Mavic 3, DJI Avata 2, DJI Neo🔥
0:57
10 ПК с затычками! Зачем? #ryzen #amd
1:16
CompShop Shorts
Рет қаралды 390 М.
БУДУЩЕЕ ИГР. ЭПОХА WINDOWS ЗАКОНЧЕНА
14:52
CELULAR SEM SENHA 😱
0:20
Renanzinn
Рет қаралды 16 МЛН
Прослушивают ли нас телефоны?
1:18
Tynalieff Shorts
Рет қаралды 2 МЛН