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

      Powering the Raspberry Pi Pico W with the MB102 Power Supply

      Powering the Raspberry Pi Pico W with the MB102 Power Supply

      Learn how to power your Raspberry Pi Pico W projects easily and flexibly with the MB102 Power Supply Module...

      How to Use L298N Motor Driver with Pico W

      How to Use L298N Motor Driver with Pico W

      Learn how to use the L298N motor driver to control DC motors with the Raspberry Pi Pico W in MicroPython.

      Controlling an LED with a Snap Using the KY-037 Sound Sensor and Raspberry Pi

      Controlling an LED with a Snap Using the KY-037 Sound Sensor and Raspberry Pi

      Discover how to set up, code, and activate the LED based on detected sound with the Raspberry Pi...

      Getting Started with the KY-037 Sound Sensor and Raspberry Pi: Detecting Sound Using Python

      Getting Started with the KY-037 Sound Sensor and Raspberry Pi: Detecting Sound Using Python

      In this tutorial, I’ll guide you through setting up the KY-037 sound sensor with a Raspberry Pi using...

      How to Post to Reddit Using Python

      How to Post to Reddit Using Python

      Post to reddit automatically using a Python script.

      How to Create a Time-Lapse Video with a Raspberry Pi Camera

      How to Create a Time-Lapse Video with a Raspberry Pi Camera

      Learn how to make a timelapse with your Raspberry Pi in Python.

      How to Integrate the MPU6050 with the STM32 Blue Pill

      How to Integrate the MPU6050 with the STM32 Blue Pill

      Learn how to measure acceleration with the STM32 and the MPU6050 in the Arduino IDE.

      Getting Started with STM32 Blue Pill in Arduino IDE Using a USB to TTL Converter — Write Your First Program

      Getting Started with STM32 Blue Pill in Arduino IDE Using a USB to TTL Converter — Write Your First Program

      This comprehensive tutorial will guide you through the process of setting up and programming the STM32 Blue Pill...

      Automate Task Scheduling in AWS with Lambda, Step Functions, and CloudWatch

      Automate Task Scheduling in AWS with Lambda, Step Functions, and CloudWatch

      In this tutorial, I'll show you how to automatically schedule tasks in AWS at regular intervals using AWS...

      Implementing Google reCAPTCHA in a Simple React and Node.js App

      Implementing Google reCAPTCHA in a Simple React and Node.js App

      Learn how to protect your React applications from bots and spam with Google reCAPTCHA integration! This step-by-step tutorial...

      Back to blog

      Leave a comment

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