As a new Linux user or even a window pro user, you will probably be familiar with the terminal or command prompt as known in windows. Those tools give user extra control when using a pc, as you can perform actions faster, automate things and so much more as compared to using the equivalent of GUI (Graphical User Interface).
Although the improvement of the GUI environment is significant, some users still stick to their never failing or never hanging command interface. Programmers have leverage on command line interface to increase their work productivity and with CLI you can go beyond the limitations or restrictions on the language or framework IDE. CLI allow anyone to use available tools other than using IDE to achieve the same result.
Arduino is a tool that has empower several makers and developers around the world, and this underlying success isn’t entirely due to the hardware design but to an easy to use software called the Arduino IDE, that makes programming possible. The Arduino IDE makes programming micro-controllers and embedded boards a thing of love and despite the robustness of the IDE, it still has it’s own challenges as well, especially for professional developers.
Arduino team has just launched the Arduino CLI (Command Line Interface) which will inevitably put Arduino in the hands of doubtful professionals in the industry. Arduino Command line interface is a single binary file that controls most of the features found on the Arduino IDE and even more. Arduino CLI is a tool that gives you the full power of creation. Just like the Arduino IDE itself, the Arduino CLI is available for use on Windows, Linux, and the Mac operating systems.
So what can you do with it? Well, that depends on your own imagination (of course, you can’t do all yet as it is still a beta release) –
- You can install an existing Arduino library with it and even build yours as well.
- Compile your own written Arduino library.
- Upload and Compile your Arduino Sketch and even compile for other hardware cores.
- Parse Output from the command line and interface with other IDE or tools using the built-in JSON interface.
- Integrate with Makefiles and compile your program with other programs as well.
- Build automated scripts and easily deploy your code on tens to hundreds of boards.
- Write your own codes from another platform like Atom, Sublime, VS, or directly from the command line using the likes of nano on Linux.
Installing project dependencies can be done with a single line of command as shown below:
arduino-cli lib install "WiFi101” “WiFi101OTA”
The Arduino team has been working hard to support the needs of our professional developer community. Many of you requested a way to use our tools in Makefiles and wanted Arduino IDE features available via a fast, clean command line interface. How cool would it be to install project dependencies with:
The CLI is not only limited to the major OS but can run on both ARM and Intel architectures. So you can use the Raspberry Pi to deploy your own Arduino code. The binaries for Linux (64-bit, 32-bit, and ARM), macOS, and Windows are available to download. More information about the CLI can be found on the getting started page on Github and also on the Arduino blog.