0

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/CommandLine – Chad G Aug 22 '18 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. – Matthew Aug 22 '18 at 18:20
  • 1
    Not really an arduino question, more of a linux one. Command not found means there is no program "arduino" in your path – Chad G Aug 22 '18 at 18:26
  • Yes... I thought this community would likely have better knowledge as to what the actual path is... – Matthew Aug 22 '18 at 18:36
  • 1
    npm 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 Aug 22 '18 at 23:53
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.