链接:https://pan.baidu.com/s/1BRqtaNBU_r-RqaItG7ClaQ
提取码:6kbe
将文件解压放到arduino安装目录“hardware”文件夹下
我的文件夹是D:\arduino-1.8.15\hardware
此时,便会发现在arduino IDE里工具–开发板选项中,多出了很多ESP32的开发板。
我们选择其中一款,点亮一个LED灯来验证我们环境搭建成功。
const int LED1 = 2;//定义板载LED引脚
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED1, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED1, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED1, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
下载之后。记得按下BOOT按键长按5秒左右,检测到板子才放手。