第3篇:vscode搭建esp32 arduino开发环境

第1篇:Arduino与ESP32开发板的安装方法

第2篇:ESP32 helloword第一个程序示范点亮板载LED

1.下载vscode并安装

https://code.visualstudio.com/

运行VSCodeUserSetup-x64-1.80.1.exe

2.点击扩展,搜索arduino,并点击安装

3.点击扩展设置,配置arduinoIDE安装路径

根据arduino.exe的安装目录进行配置

4.输入Chinese,安装中文语言包

5.安装其余插件

6.创建项目目录

D:\Arduino_Project\esp32_dev

D:\Arduino_Project\esp32_dev目录下创建blink2.txt 把txt后缀改为blink2.ino

7.用vsocde打开文件夹

关闭提示Arduino CLI提示

7.打开ino,拷贝blink 点亮led的测试程序

复制代码
/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/

// the setup function runs once when you press reset or power the board
//esp32 dev module

#define led 2
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  Serial.begin(115200);
  pinMode(led, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000); 
  Serial.println("led is high");                      // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);    
   Serial.println("led is low");                    // wait for a second
}

8.选择开发板

9.配置端口

10.开始编译

Warning\] Output path is not specified. Unable to reuse previously compiled files. Build will be slower. See README. ![](https://file.jishuzhan.net/article/1696190148741435394/c85a1fa2677b49a4b1c5824749213f75.png) # 11.上传程序 ![](https://file.jishuzhan.net/article/1696190148741435394/70fba4f49053462e81a48a262dbadfc5.png) ![](https://file.jishuzhan.net/article/1696190148741435394/0dbbd624bb2e415796a623f16473b407.png) ![](https://file.jishuzhan.net/article/1696190148741435394/18f5967d9ed44a809e5ee7f3995d67a1.jpeg)

相关推荐
gaog2zh10 小时前
100202Title和Input组件_编辑器-react-仿低代码平台项目
react.js·低代码·编辑器
_poplar_10 小时前
08.5【C++ 初阶】实现一个相对完整的日期类--附带源码
c语言·开发语言·数据结构·c++·vscode·算法·vim
翁正存10 小时前
IDEA测试代码报java file outset source root异常
java·ide·intellij-idea
一枚小小程序员哈19 小时前
基于Android的随身小管家APP的设计与实现/基于SSM框架的财务管理系统/android Studio/java/原生开发
android·ide·android studio
weixin_307779131 天前
VS Code配置MinGW64编译SQLite3库
开发语言·数据库·c++·vscode·算法
一瞬祈望1 天前
Visual Studio Code 基础设置指南
vscode·编辑器
吐个泡泡v1 天前
Maven 核心命令详解:compile、exec:java、package 与 IDE Reload 机制深度解析
java·ide·maven·mvn compile
细节处有神明1 天前
Jupyter 中实现交互式图表:ipywidgets 从入门到部署
ide·python·jupyter
程序员陆通1 天前
CloudBase AI ToolKit + VSCode Copilot:打造高效智能云端开发新体验
人工智能·vscode·copilot
任磊abc2 天前
vscode无法检测到typescript环境解决办法
ide·vscode·typescript