Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code cannot find Arduino IDE path

I have been trying to use the Arduino extension for VS Code in Ubuntu 18, but when I execute the initialize command, I get the error "Cannot find the Arduino IDE. Please specify the arduino.path in the user settings". So I wrote every path that comes out when executing the command "whereis arduino", I've also tried leaving the box empty (in theory that makes VS Code search for the IDE) and reinstalling both the Arduino IDE and VS Code several times, without any result. Does somebody knows a possible fix for this issue?

like image 743
Cnoob Avatar asked Oct 17 '25 13:10

Cnoob


2 Answers

  • Download and extract the appropriate Arduino version according to your need from here, and install it using command sudo ./install. In my case, I have downloaded Arduino 1.8.6 Linux 64 Bit .
  • Goto Files -> Preferences -> Settings, Open Settings(JSON) as shown below. Open Settings(JSON)
  • Change arduino.path to the path location of extracted Arduino file. In my case it is /home/user/Downloads/arduino-1.8.6 and arduino.commandPath to arduino.
    OR
    For those who installed Arduino through snap platform refer this post.
  • Your Settings JSON file should look like this.
{
    "arduino.path": "/home/user/Downloads/arduino-1.8.6",
    "arduino.commandPath": "arduino",
}
  • Save and restart.
    It's Done!!
    Good Luck
    P.S.:Add arduino.commandPath if not already exist and should point to Arduino executable present in the arduino.path.
like image 161
Prateek Kumar Singh Avatar answered Oct 19 '25 07:10

Prateek Kumar Singh


Even when its on mac, someone can find this helpful as I had the same problem and found this thread. On MAC I have solved this one with arduino-cli and following:

  1. install homebrew (if you have, proceed to step 2)
  2. install arduino-cli with brew install arduino-cli
  3. find where the arduino-cli is installed. Usually (on mac) it will be /opt/homebrew/bin/arduino-cli... Which means, if you run the command arduino-cli, it will execute this script... You can find the location with: which arduino-cli (I have zsh, I am not aware if it will be the same for older bash, probably it will, I am not so skilled in this one, but you can try to use find instead of which. But which is working for me
  4. lets assume you have the path, for me it was /opt/homebrew/bin/arduino-cli
  5. proceed to VScode, go to settings (well, lets assume we will be working with the json settings
  6. in my case, the input is following:
    "arduino.useArduinoCli": true,
    "arduino.path": "/opt/homebrew/bin/",
    "arduino.commandPath": "arduino-cli"

Note, even when the path to arduino-cli is /opt/homebrew/bin/arduino-cli, we are removing the script name from the path... But we are adding this to the commandPath

like image 44
tomdelahaba Avatar answered Oct 19 '25 07:10

tomdelahaba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!