Introduction to Arduino CLI
In my previous post, Getting Started With Arduino UNO R4, I showed how we can upload a sketch into an Arduino board. In this article, we are going to do the same, but this time using the Arduino CLI.
Why Arduino CLI?
I personally, use neovim for coding, which makes it a necessity for me to be able to compile and upload my code from my terminal.
If you prefer the IDE, this article might not be for you, but, understanding the CLI could be useful in the future to automate repetitive tasks or run things in a CI environment.
Installation
We can install the Arduino CLI on our system with these command:
1
2
3
4
5
6
7
8
# Create a folder to install the CLI
mkdir ~/bin/arduino-cli
# Move to the folder we created
cd ~/bin/arduino-cli
# Install
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh