How to Use Arduino IDE with Raspberry Pi Pico W

You can easily start coding in Arduino on your Raspberry Pi Pico or Pico W. This can be advantageous for people who prefer using the Arduino IDE or the Arduino programming language which is a variant of C/C++. In this tutorial we will go over the quick steps on how to do this, the only thing you will need is a Pico or Pico W and the Arduino IDE installed on your computer.

Before we get started, be sure to subscribe and support the channel if you have not!

Subscribe:

Youtube

Support:

https://www.buymeacoffee.com/mmshilleh

Step 1-) Install the 3rd Party Board Manager.

Because this board is not managed officially by Arduino, you will need to add the board yourself. To do so, add the following link to Additional Boards Manager URLs in the preferences.

Link: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

On a Mac you can find this here:

Once you click okay, you should be able to find the Raspberry Pi Pico board in the Boards Manager. Go ahead and install it.

Step 2-) Connect Board and Example Code

Now that you installed the Board you need, you can begin connecting to the physical device and write code.

  • First, we will be working with the Raspberry Pi Pico W board. To select it go to Tools > Board and find the Pico W you are working with.
  • Next, select the example we will be working with today. Go to File > Examples > WiFi > ScanNetworks. This example only works with the Pico W but it allows us to scan and see what nearby internet networks are available. You do not need to modify this code.
  • Next, plug in your Pico W while holding the bootsel button, we need to mount the device so Arduino IDE can generate a COM port for it the first time you are using it.
    • Once you plug in your device you should select the appropriate port. Go to Tools > Board > UF2 Board.
    • Next hit the upload button, it will not work the first time since the Arduino IDE still needs to generate a COM Port, but you need to click the button regardless in order to establish a port.
    • Go back into Tools > Board > <Your New Comm Port>. You will recognize which port to select as it did not show beforehand. Re-upload the code after selecting the new communication port and you should be able to see the results in the serial monitor if you selected the correct port. Good job!

      Note, if you do not hold the bootsel button and mount the device as stated you will probably get a Driver error, so keep this in mind.

      Conclusion

      You should now be ready to go to write your own C/C++ code on the Pico or Pico W, all thanks to Earle Philhower who wrote the library to do this. I hope you got this working appropriately and if you have any questions let me know, do not forget to subscribe and even better donate! Thanks for your time!

      Create a free account to access full content.

      All access to code and resources on ShillehTek.

      Signup Now

      Already a member? Sign In

      Explore More on Our Blog

      How to Use ADS1115 with the Raspberry Pi (Part 1)

      How to Use ADS1115 with the Raspberry Pi (Part 1)

      Discover how to expand your Raspberry Pi projects by integrating the ADS1115 ADC for precise analog signal reading....

      How to Install Pip Packages in AWS Lambda Using Docker and ECR

      How to Install Pip Packages in AWS Lambda Using Docker and ECR

      Learn how to streamline AWS Lambda deployments by using Docker and Amazon Elastic Container Registry (ECR) to package...

      Create Tabular Product Descriptions on Your Shopify Store

      Create Tabular Product Descriptions on Your Shopify Store

      Enhance your Shopify store's product pages with our comprehensive guide on implementing tabular descriptions. Learn how to add a...

      SSH Into Raspberry Pi with Tailscale VPN

      SSH Into Raspberry Pi with Tailscale VPN

      Effortlessly access and manage your Raspberry Pi from anywhere using Tailscale's secure mesh VPN.

      Send Email with Lua and the ESP32

      Send Email with Lua and the ESP32

      In this tutorial, we delve into sending emails with the ESP32-S3 using Lua, focusing on the Xedge IDE's built-in SMTP...

      How to Code with Lua on ESP32 with XEdge32

      How to Code with Lua on ESP32 with XEdge32

      Learn how to set up Xedge32 and start coding on the ESP32-S3 with Lua programming!

      Stream Audio From Raspberry Pi to Local Computer

      Stream Audio From Raspberry Pi to Local Computer

      Discover the simplicity of streaming live audio directly from a USB microphone connected to your Raspberry Pi to...

      SSH Raspberry Pi via Cell Phone

      SSH Raspberry Pi via Cell Phone

      This beginner-friendly guide will walk you through remotely controlling your Raspberry Pi using SSH through your cell phone.

      Remotely Control Raspberry Pi via SSH from External Network

      Remotely Control Raspberry Pi via SSH from External Network

      Learn how to SSH into your Raspberry Pi from any network. This is critical in IoT since you can control...

      Stream Video from Raspberry Pi Camera to YouTube Live

      Stream Video from Raspberry Pi Camera to YouTube Live

      Learn how to stream to YouTube from a Raspberry Pi Camera.

      Back to blog

      Leave a comment

      Please note, comments need to be approved before they are published.