当前位置:网站首页>【花雕体验】13 搭建ESP32C3之PlatformIO IDE开发环境
【花雕体验】13 搭建ESP32C3之PlatformIO IDE开发环境
2022-06-30 07:26:00 【驴友花雕】
Visual Studio Code是一个轻量级但功能强大的源代码编辑器,可以在桌面上运行,可用于Windows,macOS和Linux。它内置了对JavaScript,TypeScript和Node的支持.js并具有针对其他语言和运行时(例如C++,C#,Java,Python,PHP,Go,.NET)的扩展生态系统。
1、下载Visual Studio Code(这里下载ZIP格式)
https://code.visualstudio.com/download
2、解压缩后打开,版本1.68.1
3、打开VS Code,搜索platformio ide扩展
4、安装platformio ide扩展,版本V2.5.0
5、点击底部的HOME
6、打开HOME
7、快速创建新的项目
8、设置项目名称:ESP32_C3_Demo,带C3字样的开发板有好几种,这里先试试选择“esp32-c3-devkitm-1 ”,第三行选择Arduino
9、创建中,可能需要几分钟
10、完成创建ESP32_C3_Demo项目
11、检查是否正确检测到开发板,打开HOME,进入Devices(设备)查看ESP32C3连接的端口情况(这里是COM8)
12、测试程序一:串口输出“Hello World”
/* 【花雕体验】13 搭建ESP32C3之PlatformIO IDE开发环境 测试程序一:串口输出“Hello World” */
#include <Arduino.h>
void setup()
{
Serial.begin(115200);
}
void loop()
{
Serial.println("Hello World");
delay(1000);
}
13、通过编译
14、运行程序
15、实验串口返回情况
16、测试程序二:双LED同时闪烁,串口输出“ESP32-C3 PlatformIO”
/* 【花雕体验】13 搭建ESP32C3之PlatformIO IDE开发环境 测试程序二:双LED同时快闪,串口输出“ESP32-C3 PlatformIO” */
#define LED_D4 12
#define LED_D5 13
void setup() {
Serial.begin(115200);
pinMode(LED_D4, OUTPUT);
pinMode(LED_D5, OUTPUT);
}
void loop() {
Serial.println("Hello world!");
Serial.println("ESP32-C3 PlatformIO");
Serial.println("");
digitalWrite(LED_D4, HIGH);
digitalWrite(LED_D5, HIGH);
delay(100);
digitalWrite(LED_D4, LOW);
digitalWrite(LED_D5, LOW);
delay(1000);
}
17、可以通过编译
18、实验串口返回情况
19、实验场景图
边栏推荐
- Final review -php learning notes 9-php session control
- STM32 key control LED
- Cross compile opencv3.4 download cross compile tool chain and compile (3)
- Recurrence relation (difference equation) -- Hanoi problem
- Introduction notes to pytorch deep learning (XII) neural network - nonlinear activation
- Proteus catalog component names and Chinese English cross reference
- Efga design open source framework fabulous series (I) establishment of development environment
- Final review -php learning notes 3-php process control statement
- 深度学习——特征点检测和目标检测
- Disk space, logical volume
猜你喜欢
Arm debug interface (adiv5) analysis (I) introduction and implementation [continuous update]
November 22, 2021 [reading notes] - bioinformatics and functional genomics (Chapter 5, section 4, hidden Markov model)
November 19, 2021 [reading notes] a summary of common problems of sneakemake (Part 2)
期末复习-PHP学习笔记6-字符串处理
Introduction notes to pytorch deep learning (10) neural network convolution layer
Experiment 1: comprehensive experiment [process on]
想转行,却又不知道干什么?此文写给正在迷茫的你
right four steps of SEIF SLAM
String application -- string violent matching (implemented in C language)
HelloWorld
随机推荐
回文子串、回文子序列
Solve the linear equation of a specified point and a specified direction
Analysis of cross clock transmission in tinyriscv
C language - student achievement management system
STM32 infrared communication
Simple application of generating function
24C02
Log service management
Distance from point to line
深度学习——目标定位
期末複習-PHP學習筆記3-PHP流程控制語句
Network security and data in 2021: collection of new compliance review articles (215 pages)
Basic theory of four elements and its application
ACM. HJ48 从单向链表中删除指定值的节点 ●●
Disk space, logical volume
Implementation of binary search in C language
期末复习-PHP学习笔记7-PHP与web页面交互
期末复习-PHP学习笔记2-PHP语言基础
冰冰学习笔记:快速排序
你了解IP协议吗?