第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.

11.上传程序

相关推荐
千里马学框架11 分钟前
Android 17 成功编译运行差异部分更新
vscode·开发工具·车载开发·aosp源码·安卓17·aosp17·编译源码
2501_915918415 小时前
使用 VS Code 写 Swift 做 iOS 开发,插件能实现哪些功能,还有哪些短板
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
威嵌神州5 小时前
天脉 3 开发环境与 BSP 适配:IDE license、驱动开发、飞腾平台
ide·驱动开发·嵌入式硬件·fpga开发
东小黑6 小时前
Git 仓库操作与 VSCode 使用指南
git·vscode·gitee
我要见SA姐119 小时前
用 Claude Code 重构遗留系统:从评估到落地的完整实践指南
数据库·ide·vscode·oracle·编辑器
00后程序员张1 天前
Xcode vs KXApp,体积差几十G,选轻量方案还是完整工具链?
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
解道Jdon1 天前
JDK 27发布:紧凑对象头、G1默认、量子安全TLS
ide·windows·git·svn·eclipse·github·visual studio
别动我齐刘海1 天前
ROS2 Jazzy + C++ 实战路线——基础学习1
c++·vscode·python·ubuntu·机器学习·自动驾驶·github
lifewange2 天前
VSCode怎么运行java
java·ide·vscode
MR.P_H_2 天前
CCS(Code Composer Studio)修改编码格式
编辑器