Program Raspberry Pi Pico with Arduino IDE

In this getting started guide, we will learn how to program Raspberry Pi Pico using Arduino IDE. It will be a step-by-step guide on how to install Raspberry Pi Pico in Arduino IDE and then run a simple Arduino code for Raspberry Pi Pico.

Program Raspberry Pi Pico with Arduino IDE

To learn about the Raspberry Pi Pico board, we have an in-depth guide regarding its peripherals below:

Setting up Raspberry Pi Pico in Arduino IDE

In this section, we will list step-by-step instructions to successfully program Raspberry Pi Pico using Arduino IDE on Windows based computers.

Downloading & Installing Pico Setup Windows Installer 

The first step will be to download the Pico Setup Windows installer in our system. Click the following link (https://github.com/ndabas/pico-setup-windows/releases) and download the latest version of the installer. We are downloading v0.3.4 in our system.

Download Pico Setup Windows Installer

After specifying the path for the download, the .exe file will immediately start downloading. It will take a couple of minutes for the download to complete as the complete setup consists of 366MB.

To start the installation process, run the .exe file and the Pico Setup window opens. Click Next to proceed.

Pico setup for windows 1

Next, select all the components of Pico setup for Windows mentioned in the list below and click Next.

Pico setup for windows 2

Here specify the destination folder where the setup will be installed. Click Install to start the installation process.

Pico setup for windows 3

It will take several minutes for the Pico setup to finally get installed. Click Next once the installation is complete.

Pico setup install 4

Click the Finish button to close the setup.

Pico setup install 5

As we have successfully installed the Pico setup, let us proceed further and move to Arduino IDE.

Install Raspberry Pi Pico board in Arduino IDE

Note: Make sure, you have installed the latest version of Arduino IDE before proceeding further.

After installing the latest version of Arduino IDE, click on the Arduino IDE icon and open it.

Arduino IDE 01

After that go to File > Preferences.

Arduino IDE 02

Paste this link in Additional board manager URL

https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
Raspberry Pi Pico Board Manager URL in Arduino IDE

Note: If you already have other boards in this additional board manager URLs, you can separate them by commas and you can use as many boards you want.

Next go to Tools > Board > Boards Manager. Now you will see a window of where you search for available boards. In the search window type ‘Raspberry Pi Pico.’ Install the board highlighted below:

Raspberry Pi Pico Board Manager

Program Raspberry Pi Pico in Arduino IDE

After we have installed Raspberry Pi Pico in Arduino IDE, let us program our board with a simple example sketch.

First, we will connect our board to our system through a USB cable. Then inside Arduino IDE we go to Tools > Boards and select Raspberry Pi Pico.

Raspberry Pi Pico select board Arduino IDE

To select the port we go to Tools > Port and select the COM port through which our board is connected.

Raspberry Pi Pico select port Arduino IDE

Now let us run a simple example sketch. Go to File > Examples > Basics > Blink to open a built-in example sketch that blinks the onboard LED of the microcontroller.

The onboard LED is connected with GPIO25 in Raspberry Pi Pico. Therefore specify GPIO25 as the built-in LED.

 modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(25, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(25, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(25, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Click on upload button to upload the code to Raspberry Pi Pico. The built-in LED will start blinking at a rate of 1 second.

Raspberry Pi Pico Onboard LED Blink

If you find difficulty in uploading code, unplug the board from the USB port and plug it back in while holding down the BOOTSEL button on Raspberry Pi Pico.

After we are able to successfully turn the built-in LED on and off, we can be certain that the Arduino IDE is working perfectly with the Raspberry Pi Pico.

You may also like to read:

Leave a Comment