当前位置: 首页 > news >正文

第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的测试程序

/*BlinkTurns 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 ZEROit is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set tothe 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 Arduinomodel, check the Technical Specs of your board at:https://www.arduino.cc/en/Main/Productsmodified 8 May 2014by Scott Fitzgeraldmodified 2 Sep 2016by Arturo Guadalupimodified 8 Sep 2016by Colby NewmanThis 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 seconddigitalWrite(led, LOW);    // turn the LED off by making the voltage LOWdelay(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.上传程序

 

 

 

 

http://www.lryc.cn/news/141878.html

相关文章:

  • Apache Shiro是什么
  • Socket基本原理
  • Docker容器:本地私有仓库、harbor私有仓库部署与管理
  • Mobx在非react组件中修改数据,在ts/js中修改数据实现响应式更新
  • 什么是异步编程?什么是回调地狱(callback hell)以及如何避免它?
  • Java8 Stream流常见操作--持续更新中
  • 【Linux】多线程概念线程控制
  • Qt --- 自定义提示框 类似QMessagebox
  • Redis 分布式锁与 Redlock 算法实现
  • 【附安装包】Inventor2024安装教程 机械制图|三维制图
  • c++ 判断基类指针指向的真实对象类型
  • 退出屏保前玩一把游戏吧!webBrowser中网页如何调用.NET方法
  • hive-列转行
  • 【网络】IP网络层和数据链路层
  • 基于Spring Gateway路由判断器实现各种灰度发布场景
  • mysql57、mysql80 目录结构 之 Windows
  • Mac操作系统Safari 17全新升级:秋季推出全部特性
  • UDP通信、本地套接字
  • ChatGPT提示与技巧分享:如何作出更好的提示2023年8月
  • 网络安全(自学黑客)一文全解
  • Vue中ElementUI结合transform使用时,发现弹框定位不准确问题
  • (一)连续随机量的生成-基于分布函数
  • 【springboot】Spring Cache缓存:
  • 数学建模-建模算法(4)
  • python之函数返回数据框
  • 电子商务安全体系架构技术方面
  • 新安装IDEA 常用插件、设置
  • ChromeOS 的 Linux 操作系统和 Chrome 浏览器分离
  • 哔哩哔哩 B站 bilibili 视频倍速设置 视频倍速可自定义
  • Lazada商品详情接口 获取Lazada商品详情数据 Lazada商品价格接