Getting Started with the Pico W C/C++ SDK

Sdílet
Vložit
  • čas přidán 2. 08. 2024
  • #raspberrypi #pico #raspberry
    Read the written version here:
    ▬ Support us! ▬▬▬▬▬▬▬▬▬▬
    We publish a new show every week. Subscribe here: / @electromakerio
    We stock the latest products from Adafruit, Seeed Studio, Pimoroni, Sparkfun, and many more! Browse our shop:
    www.electromaker.io/shop
    Join us on Discord! / discord
    Follow us on Twitter: / electromakerio
    Like us on Facebook: / electromaker.io
    Follow us on TikTok: / electromaker.io
    Follow us on Instagram: / electromaker_io
    Don't have time to watch the show? Listen to the Electromaker Show in podcast format on your favourite podcast platform! directory.libsyn.com/shows/vi...
    ▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬
    Intro 00:00
    VMware 01:46
    Installing Ubuntu in the VM 03:25
    Installing VScode 05:30
    Installing git 05:48
    Cloning the Pico SDK and Examples 06:18
    Initiating the TinyUSB and WiFI chip Submodules 07:08
    Installing the toolchain 08:07
    Building an Example 10:16
    Make-ing a UF2 file 13:30
    Moving the UF2 file onto the Pico W 14:20
    Setting up your own project 15:51
    A noob's guide (me) to CMakeLists.txt 17:22
    Including the provided SDK cmake file 18:00
    Back to the CMakeLists explanation 18:39
    Including the header file required by the WiFi chip 20:44
    Creating a build folder and building the project 22:40
    Make-ing the UF2 23:25
    Installing minicom 24:06
    Moving the UF2 to the Pico W 24:37
    Reading the serial monitor using Minicom 25:06
    Success! 25:58
    ▬ References and links ▬▬▬▬▬▬▬▬▬▬
    www.vmware.com/products/works...
    ubuntu.com/
    github.com/raspberrypi/pico-sdk
    github.com/raspberrypi/pico-e...
    ▬ Disclaimer ▬▬▬▬▬▬▬▬▬▬
    All prizes not claimed within 6 months will be put back into the prize pool. Please note that some items may require payment of customs charges when they arrive in destination countries.
    Also, note that if something has a battery in it, it pretty much always means stress with sending them. These rules seem arbitrary and subject to constant change, so where possible, we'll ship things without the batteries and let you find one locally.
    Electromaker contests are separate from the Electromaker store (I literally go to the post office to send prizes) so beyond giving tracking details there isn't a lot we can do if something goes missing.
  • Věda a technologie

Komentáře • 29

  • @Lucas-pc2rt
    @Lucas-pc2rt Před 11 měsíci +3

    For this tut being a year old, it still works well! The only thing I did differently is that I had to call cyw43_arch_init() or turning on/off the led would throw an error. The blink example for the pico w was moved to the wifi folder inside of the pico_w folder in pico-examples, as well as the lwipopts.h if I am remembering correctly. Very clear and coherent video. Thanks!

    • @WeirdDuck781
      @WeirdDuck781 Před 7 měsíci +1

      needs more likes OR PIN as it makes this video still relevant and up to date.
      Thank you by the way ;)

  • @stylesoftware
    @stylesoftware Před 2 lety +6

    Keep it up buddy. To the point, that's what we want.

  • @ui4lh
    @ui4lh Před 3 měsíci

    Man, Ive been fighting with this stuff for sooooo long and this videa was a God send....
    Thanks Electromaker for making it and so detailed!!! Subscribed...

  • @rd-tk6js
    @rd-tk6js Před 22 dny

    fantastic, thanks !

  • @ww3ok
    @ww3ok Před rokem +2

    Good introduction to the Pico-W sdk and how it differs from the vanilla sdk. Thanks.

  • @maciekrostocki7202
    @maciekrostocki7202 Před rokem +1

    few things for people that will watch it now: blink example is in pico_w/wifi/blink, for me the blinking doesn't work if there isnt if(cyw43_arch_init()){....}, i also think that it's is better to declare PICO_SDK_PATH in bashrc so you don't have to do that every time and you should declare it relative to home directory, not directory you are currently in. Error lines for includes will disappear if you configure cmake for your directory, also it is worth adding set(PICO_BOARD pico_w) in CMakeLists

  • @Alamartec
    @Alamartec Před rokem +1

    Many thanks mate, you made it easy to follow.

  • @jacksparrow2000
    @jacksparrow2000 Před rokem

    Thanks a lot! These simple steps worked for both the pico W and the Tiny 2040!

  • @gordonmgx
    @gordonmgx Před 2 lety +2

    Thanks. Very interesting tutorial

  • @sotw1610
    @sotw1610 Před rokem

    Thanks for the video! It is a good introduction to get started with the picow board.

  • @ddienst
    @ddienst Před rokem

    It compiled the examples but when I try to compile the flash print it crashes on some assembly file. Can you share your VMware machine?

  • @usefulelectronics
    @usefulelectronics Před 2 lety +4

    Amazing, I am looking for a good source to start programming my pico with the native SDK

  • @ApusApus
    @ApusApus Před rokem

    Thanks, might be able to actually start using the native SDK instead of Arduino.
    Did you ever get rid of the error squiggles on the includes or are you just ignoring them?

  • @EdwinFairchild
    @EdwinFairchild Před rokem

    How do you debug and step through your code ?

    • @Electromakerio
      @Electromakerio  Před rokem

      That's something I hope to revisit at some point soon! This was meant to be a very bare bones "zero to developing" video and including debugging just made it way too long.
      But yes, Debug and step through will be a future topic, let me know if there's any other specific stuff like this and I'll add it to the list!

  • @robertbox5399
    @robertbox5399 Před rokem +1

    So you need help from the Dons at Bletchley Park to flash an LED using C on the Pico. Unbelievably complicated.

    • @Electromakerio
      @Electromakerio  Před rokem

      Since making this video, they've simplified it hugely, at least for Windows users. There is a one-click installer now. Personally, I still use more or less this method (docker rather than full VM) as I like the separation and dedicated working environment.

  • @JHess
    @JHess Před 2 lety +2

    hey friend, not sure why but this video is only available in 360p.

    • @Electromakerio
      @Electromakerio  Před 2 lety +4

      Thanks for the heads up! This actually happens every time a video gets uploaded to CZcams, the standard definition version goes live as soon as the upload finishes, and the HD version takes a while longer. It's 1080p now. I usually upload them and release them a while into the future to avoid this but wanted to get it out early today!

  • @burtonrodman
    @burtonrodman Před rokem

    type the code yourself -- agree 1000%

  • @wm6h
    @wm6h Před 6 měsíci

    VMWare 17 not free. 15 day trial only

  • @captainpumpkinhead1512

    You don't need to use a VM to program the Pico. You can do it on Windows just fine. And you're making this harder for beginners by navigating around in terminal instead of a folder explorer.

    • @Electromakerio
      @Electromakerio  Před rokem +1

      You are totally right. Windows is not a problem to set up for some folks, yet the official Pi guides are aimed at those using a Pi. Given the fact that Raspberry Pi boards weren't the easiest things to come by for a while, I thought the VM was a good solution. I'm just a hobbyist, though, and I get stuff wrong all the time. Windows used to be more hassle than this to get set up, maybe it's different now.
      As to the command line stuff, I didn't do it to be complicated, I don't know any other way to work with git and the Pico SDK build tools that is any simpler. Other than moving the uf2 file onto the Pico in the file explorer, I don't know of any GUI for git/build tools that's not more complicated to get working than the terminal commands in the video.
      All of these things said, if you know simpler ways to do this please do tell me, I'm going to make a follow up to this video at some point about the Pico and I'm always interested in learning more!

    • @coenheerink4923
      @coenheerink4923 Před rokem

      @@Electromakerio Linux is fine, even for beginners. It is worth to learn because it makes things much easier in the long run.

  • @user-kx5xy4pm1r
    @user-kx5xy4pm1r Před rokem +1

    cmake -DPICO_BOARD=blink..
    CMake Warning:
    No source or binary directory provided. Both will be assumed to be the
    same as the current working directory, but note that this warning will
    become a fatal error in future CMake releases.
    CMake Error: The source directory "/home/rstk003/pico/pico-examples/build" does not appear to contain CMakeLists.txt.
    Specify --help for usage, or press the help button on the CMake GUI. --- Why Iam getting this I couldnot solve this

    • @yaoluxttu
      @yaoluxttu Před 5 měsíci +3

      "cmake -DPICO_BOARD=blink.." between "blink" and "..". there should be a whitespace.

  • @OpTicThErmal
    @OpTicThErmal Před rokem

    Where was this tutorial 6 hours ago!?
    You ended up making all the same decisions/trade-offs I preferred (except I tried to prove to myself I could build on my mac w/o a VM), but you helped point me to the PICO_W SPECIFIC SECTION OF PICO-EXAMPLES 🤦‍♂. The only thing I could find online was "oh, working with the LED is so easy just type this line of MicroPython" ...but I'm trying to get better performance with the C SDK & for some reason the LED is fundamentally different in the W? No warnings or anything until I EVENTUALLY discovered the -DPICO_BOARD option of cmake THANKFULLY. I kept trying to flash the original blink.c for my hello world & I was scrambling in every direction. No idea why it was so different that they couldn't just redefine "PICO_DEFAULT_LED_PIN", but I trust there's a more fundamental difference in the hardware. EVEN IF I noticed the pico_w/ directory (which I wouldn't've), I never would've looked beyond wifi/
    Thanks for saving my day!
    Also credit to this forum comment that led me here: dev.webonomic.nl/blinking-a-led-on-the-raspberry-pi-pico-w#comment-78519