Program Raspberry Pi Pico With Arduino IDE

0

Hi friends today in this article i’ll show you How to Program Raspberry Pi Pico With the Arduino IDE

Do you already know the Raspberry Pi Pico ? It was recently launched by the Raspberry Pi Foundation .

In addition to the Raspberry Pi Pico having the RP2040 microcontroller –  which has two ARM Cortex-M0+ cores with a clock rate of up to 133 MHz – 256 KB RAM memory and 2 MB Flash memory, it supports two programming languages:

Python and C / C ++. It is this nice little board shown in the image below and that today we are going to program using the Arduino IDE .

Raspberry pi pico projects

Raspberry pi pico

Before moving on to the tests, let’s take a look at the characteristics of the board.

The Raspberry Pi Pico

As we mentioned above, the Raspberry Pi Pico is a microcontrolled card that has the RP2040 as a brain , a microcontroller developed by the Raspberry Pi Foundation and that has two ARM Cortex-M0 + cores capable of running up to 133MHz clock .

It is no small feat.

  • This card has 256 KB of RAM and just for comparison, it is the same amount of memory present in an Arduino Mega card .
  • Pico also has 2 MB of flash memory and a built-in real-time clock (RTC), as well as a temperature sensor.

Raspberry Pi Pico micro USB connection

The micro-usb connector is for both power and programming. In terms of interfaces, we have the most common ones, such as I2C, SPI and serial / UART , which allows the connection of various types of displays, sensor, modules and other devices.

The GPIO pins 40 and comprises the signal level (logic level) is 3.3 V pins . Be aware of this when setting up your projects, okay?

List of  a few useful Rpi Pico links:

Using the Raspberry Pi Pico with Arduino IDE

In terms of programming, the most “basic” is to use the Raspberry Pi Pico with MicroPython or CircuitPython , programming in … Python. You can also program in C / C ++ using the method of transferring UF2 files to the board, but that doesn’t seem very friendly.

For those who are already more than accustomed to the Arduino IDE, another option is to perform C ++ programming using the Arduino language, and we will show that now.

And what is the advantage? Use the thousands (millions?) Of examples and all the documentation generated by the Arduino community to program Raspberry pi Pico.

The first thing we have to do is download the Pico Setup Windows . (This is a fairly large download)

In this post we are using version 0.31 , and the download is 352 MB, which can be a bit time consuming to download depending on your connection.

  • Download the 64-bit (x64) or 32-bit (x86), depending on the version of Windows that is installed on your machine.
  1. Launch the installer. 

(Image credit: Tom’s Hardware)

2.  Ensure that all of the components are selected

Pico Setup for Windows

(Image credit: Tom’s Hardware)

When running the installer, select all available options, unless you already have any of the components installed

3. Installations

After that just select Next -> Install and the necessary files will be installed. There’s not much secret.

4. Download the Arduino IDE and install it to your laptop.

5. Open the Arduino application and navigate to File >> Preferences.

Now enter the Arduino IDE and in the File -> Preferences menu place the following URL in the Additional URLs for Board Managers field :

URL for board :- https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

Click Install to install all of the applications. This can take some time, and at times it may appear stuck, but be patient.

Your screen should look like this:

Click OK to exit and now go to the Tools -> board-> board Manager menu .

Type “pico” in the search box and then install the Raspberry Pi Pico / RP2040 board. This will trigger another large download, approximately 300MB in size.

look for Pico and select the Raspberry Pi Pico / RP2040 , then click on Install :

On the manager screen, look for Pico and select the Raspberry Pi Pico / RP2040 , then click on Install :

Programming with IDE

With the arduino IDE configured and the Raspberry Pi Pico card selected, load the program below into the IDE.

Now that our IDE is ready to program Pico, we can start by selecting the board.

  • Go to Tools >> Board >> Raspberry Pi Rp2040 Boards and select Raspberry Pi Pico.
  • Now connect the board to your computer using a USB. But make sure you hold down the “BOOTSEL” button while you connect. This will open the Pi as a storage device.
  • Next, go to File >> Examples >> Basics and select Blink. This will open a new window with Arduino’s default blink sketch.
  • Just press the upload button and wait for a few seconds

Conclusion

Share.

About Author

Leave A Reply