下载arduino-cli(废弃,优先使用platformio)

https://github.com/arduino/arduino-cli/releases/

vscode下载Arduino插件(不推荐)

点击扩展设置查看json新增以下代码

    "arduino.useArduinoCli": true,
    "arduino.logLevel": "info",
    "arduino.allowPDEFiletype": false,
    "arduino.enableUSBDetection": true,
    "arduino.disableTestingOpen": false,
    "arduino.skipHeaderProvider": false,
    "arduino.additionalUrls": [
        "http://arduino.esp8266.com/stable/package_esp8266com_index.json"
    ],

初始化配置

arduino-cli set directories.user "D:\adruino\Arduino15"

修改配置文件

arduino-cli config set directories.user "D:\adruino\Arduino15"

解决控制台乱码

a.打开C:\Users\PC.vscode\extensions\vsciot-vscode.vscode-arduino-0.6.0-win32-x64\out\src\common\util.js b.注释219行:codepage = chcp.toString().split(":").pop().trim();

使用PlatformIO IDE插件(推荐)

  • 下载PlatformIO IDE插件
  • 配置PLATFORMIO_CORE_DIR环境变量,保存下载缓存。防止下载到C盘