使用Arduino开发ESP32开发环境搭建
1.打开Arduino IDE,选择文件->首选项->设置 复制下方的ESP32板管理网址,添加到附加开发板管理器中: https://dl.espressif.com/dl/package_esp32_index.json 2.选择:工具->开发板->开发板管理器 在弹出的对话框中搜索ESP32,点击安装(注意:安装这一步需要翻墙) 3.然后重启Arduino IDE,即可发现ESP32的板载信息出现在列表里 4.点击工具->开发板,选择ESP32 Wrover Module 5.进行测试
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("Hello ESP32. Hello Arduino!");
delay(1000);
}
上传成功后打开右上角的串口监视器,修改对应的串口波特率为115200
6.我编译成功,上传的时候出现了这样的错误
A fatal error occurred: Timed out waiting for packet content A fatal error occurred: Timed out waiting for packet content
是由于ESP32的开发版下载速度太大出的问题,把下载速度设为更低的波特率即可 一些参考: https://blog..net/ironpandaaa/article/details/104392461?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161691119716780269882725%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=161691119716780269882725&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduend~default-1-104392461.pc_search_result_before_js&utm_term=arduino+esp32&spm=1018.2226.3001.4187
