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

news/2024/7/16 9:27:12 标签: vscode, ide, 编辑器

第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.上传程序

 

 

 

 


http://www.niftyadmin.cn/n/4964247.html

相关文章

ModaHub魔搭社区:WinPlan企业经营垂直大模型数据建模(二)

目录 维度模版管理 录入维度数据 经营指标 创建经营指标 经营指标管理 维度模版管理 创建维度后,可在维度库的左侧栏展示全部启用中的维度,你也可以再次编辑维度模版;如不再需要该维度,可停用,停用后可在停用管理里重新启用或删除。 1)停用:维度停用后,不会出现在…

Go语言入门指南:从零开始探索Go的世界

一、简介 欢迎来到Go语言入门指南。在这个博文中,我们将带领你了解Go语言的背景、特点,以及如何从头开始编写一个简单的Go程序。让我们一起探索这个简洁、高效且强大的编程语言吧! 二、Go的历史与特点 Go,又称Golang&#xff0…

Kaggle分类问题Titanic——Machine Learning from Disaster

目录 前言1 题目介绍2 数据清洗3 数据可视化分析4 模型训练5 源码 前言 这是我在大三选修课的课程设计,内容参考了Kaggle上高赞的代码,有详细批注,整体比较基础,结构相对完整,便于初学者学习。这个是一个分类问题&am…

【算法】字符匹配算法详解与代码实现

在计算机科学中,字符匹配算法是一种在给定文本中查找特定模式的技术。这些算法在各种应用中都发挥着重要作用,包括文本编辑器、搜索引擎、网络安全和生物信息学等。本文将详细介绍两种常用的字符匹配算法:朴素方法和KMP算法。我们还将提供Pyt…

【案例】登录注册

<template><div class"loginhome"><Header :butShow"butShow"></Header><div class"formdiv"><div style"text-align:center;padding:10px;"><h3>你好登录账号{{ stauts 3? 注册:登录 }}…

(嵌入式c语言)c语言编译常见错误

c语言->机器码的过程&#xff1a; 预处理&#xff08;gcc -E -o&#xff09;->编译&#xff08;gcc -S -o&#xff09;->汇编&#xff08;gcc -c -o&#xff09;->链接&#xff08;gcc -o&#xff09; 预处理 将代码中的define 和 include替换成实体码 define和…

LoRA继任者ReLoRA登场,通过叠加多个低秩更新矩阵实现更高效大模型训练效果

论文链接&#xff1a; https://arxiv.org/abs/2307.05695 代码仓库&#xff1a; https://github.com/guitaricet/peft_pretraining 一段时间以来&#xff0c;大模型&#xff08;LLMs&#xff09;社区的研究人员开始关注于如何降低训练、微调和推理LLMs所需要的庞大算力&#xf…

使用 ChatGPT 创建 PowerPoint 演示文稿

让 ChatGPT 成为您的助手来帮助您编写电子邮件很简单,因为众所周知,它非常能够生成文本。很明显,ChatGPT 无法帮助您做饭。但您可能想知道它是否可以生成文本以外的其他内容。在上一篇文章中,您了解到 ChatGPT 只能通过中间语言为您生成图形。在这篇文章中,您将了解使用中…