After installing the Arduino IDE on MacOS (1.8.5), I am trying to run some commands in the terminal to flash the firmware on an Uno R3.
I have successfully connected and uploaded through the GUI, but would like to use the command line for the johnny-five
API (https://github.com/rwaldron/johnny-five/wiki/Getting-Started).
However, when running
arduino --install-library "Firmata,Servo"
I get the following error:
-bash: command not found
How do I install the command line interface?
-
simple google search gives this playground.arduino.cc/Learning/CommandLineChad G– Chad G2018年08月22日 18:14:32 +00:00Commented Aug 22, 2018 at 18:14
-
I was on that page earlier today. It says the CLI has been available since 1.5, but it isn't bound to anything on the command line on my machine after installing 1.8.5.ang– ang2018年08月22日 18:20:39 +00:00Commented Aug 22, 2018 at 18:20
-
1Not really an arduino question, more of a linux one. Command not found means there is no program "arduino" in your pathChad G– Chad G2018年08月22日 18:26:35 +00:00Commented Aug 22, 2018 at 18:26
-
Yes... I thought this community would likely have better knowledge as to what the actual path is...ang– ang2018年08月22日 18:36:16 +00:00Commented Aug 22, 2018 at 18:36
-
1npm is the Node.JS package manager. It has nothing to do with the Arduino IDE, it just installs a Node package with the name 'arduino'.tttapa– tttapa2018年08月22日 23:53:34 +00:00Commented Aug 22, 2018 at 23:53
1 Answer 1
Instructions to installing and binding the Arduino CLI can be found at
https://github.com/arduino/arduino-cli#getting-started
Once you install the binary, copy the executable into a directory which is in your PATH environment variable (such as /usr/local/bin/
).
Note: You may have to rename the binary to arduino-cli
.
Explore related questions
See similar questions with these tags.