点亮一个esp32 的led

最近入了一个ESP32 兄弟们,这玩意还可以,买来肯定是给它点亮啊对吧 我就是点灯侠🎇

😭千万不要不接天线啊,不然你会一直找不到你的wifi

1.点灯第一步你得有IDE == Arduino

就是这个绿东西

可是怎么下载安装呢?自己百度吧,当然你要是懒这边也给您附加了连接

Arduino 安装 ---这里作者认为你看连接并且你安装好了

esp32 sdk 安装 ---这里也作者认为你看连接并且你安装好了

2023/5/2 值得注意的是 这个sdk你需要以管理员的身份去运行

ok 现在进入第二步

2.编写点灯程序

cpp 复制代码
const int LED = 2;
void setup() {
    // initialize digital pin LED_BUILTIN as an output.
    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);                       // wait for a second
    digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
    delay(1000);                       // wait for a second
}

烧录

一定要选串口

上传

cpp 复制代码
项目使用了 219045 字节,占用了 (16%) 程序存储空间。最大为 1310720 字节。
全局变量使用了16088字节,(4%)的动态内存,余留311592字节局部变量。最大为327680字节。
esptool.py v3.3
Serial port COM4
Connecting......
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: e8:31:cd:74:1c:84
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00045fff...
Flash params set to 0x022f
Compressed 18880 bytes to 12992...
Writing at 0x00001000... (100 %)
Wrote 18880 bytes (12992 compressed) at 0x00001000 in 0.5 seconds (effective 279.9 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 350.9 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 490.3 kbit/s)...
Hash of data verified.
Compressed 219440 bytes to 120828...
Writing at 0x00010000... (12 %)
Writing at 0x0001d956... (25 %)
Writing at 0x00022fd3... (37 %)
Writing at 0x00028288... (50 %)
Writing at 0x0002d6ef... (62 %)
Writing at 0x00035f5d... (75 %)
Writing at 0x0003e042... (87 %)
Writing at 0x000438e3... (100 %)
Wrote 219440 bytes (120828 compressed) at 0x00010000 in 2.4 seconds (effective 722.3 kbit/s)...
Hash of data verified
相关推荐
御控工业物联网2 小时前
智能制造综合实训平台数据采集物联网解决方案
物联网·制造·工控·工业自动化·制造业
玩转以太网2 小时前
3 种方式玩转网络继电器!W55MH32 实现网页 + 阿里云 + 本地控制互通
网络·物联网·阿里云
时序数据说17 小时前
国内时序数据库概览
大数据·数据库·物联网·时序数据库·iotdb
青岛前景互联信息技术有限公司21 小时前
应急救援智能接处警系统——科技赋能应急,筑牢安全防线
人工智能·物联网·智慧城市
厦门辰迈智慧科技有限公司1 天前
白蚁监测仪是什么,其工作原理和应用领域
物联网·安全·自动化·监测
stone51951 天前
TOTP算法与HOTP算法
c语言·物联网·算法·嵌入式·iot平台·智能门锁
蓝策电子1 天前
高精度蓝牙定位:技术、应用与未来发展
物联网·智慧城市
程序猫A建仔2 天前
【物联网】基于树莓派的物联网开发【26】——树莓派开启串口并配置串口助手Minicom
物联网
k↑2 天前
物联网之小白调试网关设备
网络·物联网
不断提高2 天前
多种适用于 MCU 固件的 OTA 升级方案
单片机·mcu·ota升级·双分区升级