Chapter 0 Getting Ready (Important)
Before starting building the projects, you need to make some preparation first, which is so crucial that you must not skip.
Programming Software
Arduino Software (IDE) is used to write and upload the code for Arduino Board.
First, install Arduino Software (IDE): visit https://www.arduino.cc/en/software/
Select and download corresponding installer based on your operating system. If you are a Windows user, please select the “Windows” to download and install the driver correctly.
After the downloading completes, run the installer. For Windows users, there may pop up an installation dialog box of driver during the installation process. When it is popped up, please allow the installation.
After installation is completed, an shortcut will be generated in the desktop.
Run it. The interface of the software is as follows:
Programs written with Arduino IDE are called sketches. These sketches are written in a text editor and are saved with the file extension.ino. The editor has features for cutting/pasting and for searching/replacing text. The console displays text output by the Arduino IDE, including complete error messages and other information. The bottom right-hand corner of the window displays the configured board and serial port. The toolbar buttons allow you to verify and upload programs, open the serial monitor, and access the serial plotter.
|
Verify Checks your code for errors compiling it. |
|
Upload Compiles your code and uploads it to the configured board. |
|
Debug Troubleshoot code errors and monitor program running status. |
|
Serial Plotter Real-time plotting of serial port data charts. |
|
Serial Monitor Used for debugging and communication between devices and computers. |
Installation of Development Board Support Package
Make sure your network is of good connection.
Open Arduino IDE, and click File -> Preference. In new pop-up window, find “Additional Boards Manager URLs”, and replace with a new line:
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
As shown below:
Open Arduino IDE. Click Tools -> Board -> Boards Manager…on the menu bar.
Enter Pico in the searching box, and select “Raspberry Pi Pico/RP2040” and click on Install.
Click Yes in the pop-up “dpinst-amd64.exe” installation window. (Without it, you will fail to communicate with Arduino.) Thus far, we have finished installing the development support package.
Uploading Adruino-compatible Firmware for Pico
If your Pico is new and you want to use Arduino to learn and develop, you need to upload an Adruino-compatible Firmware for it. Please refer to the following steps to cinfigure.
Disconnect Pico from computer. Keep pressing the white button (BOOTSEL) on Pico, and connect Pico to computer before releasing the button. (Note: Be sure to keep pressing the button before powering the Pico, otherwise the firmware will not download successfully)
Open Arduino IDE. Click File -> Examples -> 01.Basics -> Blink.
Click Tools -> Board -> Raspberry Pi RP2040 Boards -> Raspberry Pi Pico.
Upload sketch to Pico.
When the sketch finishes uploading, you can see the following prompt.
And the indicator on Pico starts to flash.
Click Tools -> Port -> COMx(Raspberry Pi Pico). X of COMx varies from different computers. Please select the correct one on your computer. In our case, it is COM9.
Note
1. At the first time you use Arduino to upload sketch for Pico, you don’t need to select port. After that, each time before uploading sketch, please check whether the port has beed selected; otherwise, the downloading may fail.
2. Sometimes when using, Pico may lose firmware due to the code and fail to work. At this point, you can upload firmware for Pico as mentioned above.




