Programming RASPBERRY PI PICO With ARDUINO IDE How

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

instructables

Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up


C Language on Raspberry Pico

by Maurizio Miscio

Hi guys, in this article we will see how to program the Raspberry Pi Pico with the Arduino IDE so as not to give up the C
language when we use another maker board.

https://www.youtube.com/watch?v=pBrprlfH1IA

Step 1: What Is Raspberry Pi Pico

The Raspberry Pi Pico is the rst microcontroller produced by Raspberry Pi, which until then was known as a
manufacturer of single board computers focused on the educational and maker markets.
The Pi Pico is nothing more than an alternative version to an Arduino Nano actually.
In Raspberry Pi products, the Pico is unique because it uses a new microcontroller chip also produced by Raspberry
Pi. The RP2040 microcontroller!
Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up C Language on Raspberry Pico: Page 1
The RP2040 is a powerful device with integrated voltage regulation and two internal PIO (Programmable Input Output)
processors to enable the creation of custom I/O interfaces.
At just $4, the Pico has joined all those boards like Seeeduino XIAO that have a low-cost, high-performance
microcontroller.

Step 2: Preparing the Arduino IDE

Pico would normally be programmed in MicroPhyton but the C community is too big to pass up. However, having said
that, I refer you to another article which is the rst of a series on how to program the Raspberry Pi Pico in MicroPhyton
and with the Thonny IDE.
To program the Raspberry Pi Pico with the Arduino IDE, we will need to add the Board Manager to manage the new
microcontroller.

Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up C Language on Raspberry Pico: Page 2
Step 3: Install the Board Manager on the Arduino IDE

The Raspberry Pi Pico Arduino Core is a board manager maintained on GitHub by user Earle F Philhower . This core
covers not only the original Pico and Pico W, but also pretty much any RP2040-based board you want.
To add this to your Arduino IDE, you'll need to change your preferences to add a JSON string in the same way we've done
for other boards like the ESP32 and Seeeduino XIAO.
You can do it as follows:
Open the Arduino IDE.
Click on the File menu item at the top and select Preferences. The Preferences dialog will open .
Within the Preferences dialog, look for a text box labeled "Additional Tab Manager URLs."
This is where you will enter a JSON string. If the box is empty you can paste it directly, otherwise click on
the icon to the right of the box to open a text window that allows you to add multiple JSON strings, one
per line.

The string you want to add is the following:


https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
After adding the string to the Add-in Manager URLs, you can click OK to save it in your Preferences

Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up C Language on Raspberry Pico: Page 3
Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up C Language on Raspberry Pico: Page 4
Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up C Language on Raspberry Pico: Page 5
Step 4: Install Raspberry Pi Pico Board

The JSON le entry doesn't actually install new Pico RP2040 boards but it points to a location where your Board Manager
can get updates. You will need to add the new boards using the Boards Manager utility in the Arduino IDE.
Open the Boards Manager utility by selecting the Tools menu. Scroll down until you see an entry for the type of board
(for example, Arduino Uno) you're currently set up for. Highlight it and another menu will appear, allowing you to change
your existing board or launch the Board Manager.
When the Boards Manager window has launched, lter your search by typing "Pico". You will get three results, the second
one, "Raspberry Pi Pico/RP2040" is what you want.
Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up C Language on Raspberry Pico: Page 6
Select it and click the Install button to install the new Boards Manager entry.
It will take a minute to copy all the les, once you're done, you're ready to start using Pico W on your Arduino IDE.

Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up C Language on Raspberry Pico: Page 7
Step 5: Try Sketch Blink

Now that you have the new tab manager les installed, I recommend you test it out. Since the standard method of
testing ANY new board is the Blink sketch, refer to the lore.
In this case, it's a good choice, as it uses the " LED_BUILTIN " constant for the built-in LED and therefore we don't have to
look for the pin associated with the Raspberry Pi Pico's built-in led (which is 25).
Upload the Blink sketch , found in the Examples gallery, into the Arduino IDE . We'll use it as-is, since it already uses
"LED_BUILTIN", it should work with the Raspberry Pi Pico as well.

Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up C Language on Raspberry Pico: Page 8
Once this is done, go to the port selection drop-down menu and select Raspberry Pi Pico at COM 3 (in my case it is 4, in
yours it could be di erent)

Step 6: Conclusion

This was how to program a Raspberry Pi Pico board with the Arduino IDE (in this case 2.0). See you in the next article /
video.
Thank you for watching the video or reading the article.
Good to see arduuino board manager in raspberry pi Pico

Programming RASPBERRY PI PICO With ARDUINO IDE-How Not to Give Up C Language on Raspberry Pico: Page 9

You might also like