Arduino CLI 1.0 released – Let’s try it with the Raspberry Pi Pico 2

Arduino has just announced the release of the Arduino CLI version 1.0.0, the first stable release for which users and developers can be confident the software API won’t change over time, or at least with minimal changes that will not impact the workflow of applications based on it.

We first looked at the Arduino CLI when it was still at the alpha stage way back in 2018. Arduino CLI version 1.0.0 was actually quietly released about two months ago, but Arduino only announced it now and the utility is now at version 1.0.4 with several bug fixes.

Arduino CLI 1.0 release

Arduino CLI 1.0

The goal of the API is to easily program the boards from the command line without having to use the Arduino IDE, and the CLI can be integrated into your own script to automatize various processes.

Arduino explains there are three ways to integrate and utilize the capabilities of the utility:

  • Command line interface to manage boards and libraries, compile sketches, and upload code to Arduino boards.
  • gRPC interface to allows developers to interact with the CLI using their preferred programming language, allowing for the creation of custom applications and services that leverage the full functionality of the Arduino ecosystem. It can notably be used to create custom IDEs or plugins.
  • Go module to use Arduino CLI’s packages within custom applications written in the Go programming language.

You’ll find a detailed changelog for Arduino CLI 1.0.0 to 1.0.4 on GitHub.

Testing Arduino CLI with Raspberry Pi Pico 2

Arduino CLI Raspberry Pi Pico 2

I installed Arduino CLI 1.0.4 on my machine, a Ubuntu 22.04 laptop, to give it a quick try. A lot has changed since the alpha version was released six years ago, starting with the installation procedure:


It will install arduino-cli in the bin directory of the current directory, in my case ~/edev/arduino/bin. Most people should consider installing it in a directory that’s in their PATH.

It has several extra commands such as burn-bootloader, daemon to run the Arduino CLI as a gRPC daemon, upgrade to upgrade installed cores and libraries, and others:


You’ll be able to perform most tasks done in the Arduino IDE from the command line. Let’s follow the getting started guide in the documentation by first creating a default configuration file for arduino-cli:


We can check the content of the YAML file:


I have a Raspberry Pi Pico 2 board on my desk, so let’s try since it is supported by the Raspberry Pi Pico Arduino Core 4.0.x. I manually added the board URL to the YAML file:


But after further reading the documentation, I noticed it’s possible to add a board URL (e.g. for ESP32) as follows:


We can update the local cache of selected platforms and libraries:


Let’s create a sketch directory…


… and write a blink sample in the just created cnxsoft-sketch.ino file:


Let’s connect the Raspberry Pi Pico 2 to the laptop in bootloader mode. The board should be listed:


I was hoping for something nicer, but maybe it’s because it’s a generic RP2350 board:


The FQBN (Fully Qualified Board Name) is the important part as we’ll need it to compile our sample:


It looks good so far. The final step is to upload the firmware to the Raspberry Pi Pico 2 board:


That’s it, and the built-in LED of my board is indeed blinking now. That was relatively easy to get started, and it may boost the productivity of people preferring to work from the command line compared to using the Arduino IDE.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

3 Replies to “Arduino CLI 1.0 released – Let’s try it with the Raspberry Pi Pico 2”

    1. Which, in this case, is anything other than the Arduino IDE. Maybe i’m being an inflexible baby, but i have trouble working in that environment. It’s nice, but just not for me. YMMV etc.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC