淘寶的網(wǎng)站建設(shè)品牌推廣手段
Arduino主頁網(wǎng)址:
Software | Arduino
以windows11版本為例:
Arduino IDE最新版本為2.0.3
左邊的按鈕是直接下載(免捐贈):
?
?
下載安裝完成后,更改軟件默認(rèn)語言:
?
默認(rèn)的庫是不支持ESP32的:
需要單獨(dú)安裝支持庫:
這里輸入ESP32 ARDUINO的網(wǎng)址。
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
如果安裝過其他版本的esp32 package,請先刪除,再使用本安裝包,刪除方法:文件管理器地址欄輸入 %LOCALAPPDATA%/Arduino15/packages,回車進(jìn)入,然后刪除掉其中的esp32文件夾
安裝支持庫網(wǎng)址填在這里:
?
設(shè)置一下代理
?
確認(rèn)可以從github正常下載文件:
?開始下載相關(guān)文件
(有些慢,需要有耐心,如果出現(xiàn)錯誤,重新點(diǎn)擊安裝并耐心等待下載完成):
"https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-win64.zip":.....
?安裝完成:
?
本地安裝方式
不推薦,當(dāng)無法正常訪問github時可考慮采用。
路徑填入:
例如:
File:///G:/bsp/ESP32/arduino_esp32/package_esp32_index.json
File:///G:/ESP32/package_esp32_index.json
本地包解壓并重命名目錄為:ESP32
相關(guān)資源壓縮包百度搜索即可,由于存在與VSCODE兼容問題,不推薦。
Helloworld例程
開發(fā)板選擇ESP32S3 Dev Module
?
?
示例代碼:
void setup() {// put your setup code here, to run once:Serial.begin(921600);Serial.print("hello world!\n");
}void loop() {// put your main code here, to run repeatedly:}
編譯及燒寫
點(diǎn)擊右箭頭,進(jìn)行編譯及燒寫:
?燒寫完成,等待手動reset:
?打開串口監(jiān)視器:
?每按動一次reset鍵,輸出窗口打印:hello world!
?LOG文件:
項目使用 250905 字節(jié)(19%)的程序存儲空間。最大值為 1310720 字節(jié)。個全局變量使用 18928 個字節(jié)(5%)的動態(tài)內(nèi)存,剩下 308752 個字節(jié)用于局部變量。最大值為 327680 字節(jié)。
esptool.py v4.2.1
Serial port COM28
Connecting....
Chip is ESP32-S3
Features: WiFi, BLE
Crystal is 40MHz
MAC: 7c:df:a1:f9:ff:20
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x0004dfff...
Compressed 14768 bytes to 10148...
Writing at 0x00000000... (100 %)
Wrote 14768 bytes (10148 compressed) at 0x00000000 in 0.3 seconds (effective 392.1 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (effective 625.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 847.0 kbit/s)...
Hash of data verified.
Compressed 251296 bytes to 140180...
Writing at 0x00010000... (11 %)
Writing at 0x0001d99a... (22 %)
Writing at 0x00023f29... (33 %)
Writing at 0x00029403... (44 %)
Writing at 0x0002e96e... (55 %)
Writing at 0x00033ff6... (66 %)
Writing at 0x0003d5a7... (77 %)
Writing at 0x000448f0... (88 %)
Writing at 0x0004a0b8... (100 %)
Wrote 251296 bytes (140180 compressed) at 0x00010000 in 3.3 seconds (effective 607.7 kbit/s)...
Hash of data verified.Leaving...
Hard resetting via RTS pin...