arduino配置esp32-cam開發(fā)環(huán)境

1、安裝arduino

https://www.arduino.cc/en/Main/Software?setlang=cn

image.png

根據(jù)需要下載所需版本并安裝;
運行下;
image.png

image.png

只有默認的arduino配套的開發(fā)板;

2、配置esp32

打開首選項

image.png

配置esp庫url
https://dl.espressif.com/dl/package_esp32_index.json

配置開發(fā)板

image.png

根據(jù)esp32搜索選中安裝;


image.png

文件比較大下載比較慢,如果有需要請翻墻處理;


image.png

安裝完成就可以選擇esp32開發(fā)板了。

3、配置編譯tools

C:\Program Files (x86)\Arduino\hardware
建立目錄espressif/esp32


image.png

https://github.com/espressif/arduino-esp32
下載文件然后復(fù)制到目錄;

image.png

然后找到執(zhí)行下,機器需要python環(huán)境;


下載需要時間;

4、體驗測試;

選擇開發(fā)板類型

image.png

選擇sample程序

image.png

image.png

修改攝像頭類型;改成安信可esp32-cam

// Select camera model
//#define CAMERA_MODEL_WROVER_KIT
//#define CAMERA_MODEL_M5STACK_PSRAM
#define CAMERA_MODEL_AI_THINKER

配置wifi

const char* ssid = "HI-WOOYA_471D";
const char* password = "12345678";

編譯

選擇項目菜單,編譯/驗證試試看;


image.png

運行成功;

燒錄固件;

選擇esp32-cam對應(yīng)的串口;


image.png

選擇菜單上傳;
需要把燒錄的接口接gnd,然后觸發(fā)reset下;然后就看到編譯后開始燒錄了;



出現(xiàn)下面提示燒錄完成;
image.png

5、測試效果;

arduino的串口調(diào)試不夠方便,推薦友善調(diào)試助手;



把燒錄的 杜邦線拿掉;
reset下;

[17:36:35.541] ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:10088
load:0x40080400,len:6380
entry 0x400806a4
[17:36:37.594] 
[17:36:39.044] .
[17:36:39.551] .
WiFi connected
Starting web server on port: '80'
Starting stream server on port: '81'
Camera Ready! Use 'http://192.168.1.126' to connect

根據(jù)提示的ip地址訪問下,要連接同一個wifi;
視頻就是連接輸出更多的圖片;圖片越大延時越大;

[17:40:29.055] MJPG: 45493B 168ms (6.0fps), AVG: 255ms (3.9fps), 0+0+0+0=0 0
[17:40:29.211] MJPG: 45793B 155ms (6.5fps), AVG: 253ms (4.0fps), 0+0+0+0=0 0
[17:40:29.370] MJPG: 46325B 159ms (6.3fps), AVG: 255ms (3.9fps), 0+0+0+0=0 0
[17:40:29.567] MJPG: 46507B 196ms (5.1fps), AVG: 255ms (3.9fps), 0+0+0+0=0 0
[17:40:29.681] MJPG: 46692B 116ms (8.6fps), AVG: 255ms (3.9fps), 0+0+0+0=0 0
[17:40:29.860] MJPG: 47077B 176ms (5.7fps), AVG: 255ms (3.9fps), 0+0+0+0=0 0
[17:40:30.010] MJPG: 47449B 149ms (6.7fps), AVG: 255ms (3.9fps), 0+0+0+0=0 0
[17:40:30.168] MJPG: 47684B 157ms (6.4fps), AVG: 255ms (3.9fps), 0+0+0+0=0 0
[17:40:30.330] MJPG: 48014B 166ms (6.0fps), AVG: 256ms (3.9fps), 0+0+0+0=0 0
[17:40:30.488] MJPG: 48215B 157ms (6.4fps), AVG: 255ms (3.9fps), 0+0+0+0=0 0
[17:40:30.648] MJPG: 48396B 160ms (6.2fps), AVG: 256ms (3.9fps), 0+0+0+0=0 0
[17:40:30.811] MJPG: 48359B 159ms (6.3fps), AVG: 255ms (3.9fps), 0+0+0+0=0 0
[17:40:30.970] MJPG: 48432B 163ms (6.1fps), AVG: 254ms (3.9fps), 0+0+0+0=0 0
[17:40:31.139] MJPG: 48454B 168ms (6.0fps), AVG: 256ms (3.9fps), 0+0+0+0=0 0
[17:40:31.296] MJPG: 48644B 154ms (6.5fps), AVG: 256ms (3.9fps), 0+0+0+0=0 0
[17:40:31.451] MJPG: 48676B 153ms (6.5fps), AVG: 160ms (6.2fps), 0+0+0+0=0 0
[17:40:31.610] MJPG: 48759B 162ms (6.2fps), AVG: 165ms (6.1fps), 0+0+0+0=0 0
[17:40:31.797] MJPG: 48763B 183ms (5.5fps), AVG: 161ms (6.2fps), 0+0+0+0=0 0
[17:40:31.928] MJPG: 48757B 131ms (7.6fps), AVG: 159ms (6.3fps), 0+0+0+0=0 0
[17:40:32.100] MJPG: 48791B 175ms (5.7fps), AVG: 160ms (6.2fps), 0+0+0+0=0 0
[17:40:32.249] MJPG: 48805B 144ms (6.9fps), AVG: 159ms (6.3fps), 0+0+0+0=0 0
[17:40:32.418] MJPG: 48861B 167ms (6.0fps), AVG: 159ms (6.3fps), 0+0+0+0=0 0
[17:40:32.569] MJPG: 48839B 156ms (6.4fps), AVG: 159ms (6.3fps), 0+0+0+0=0 0
[17:40:32.747] MJPG: 48830B 173ms (5.8fps), AVG: 158ms (6.3fps), 0+0+0+0=0 0
[17:40:34.268] MJPG: 48848B 1526ms (0.7fps), AVG: 228ms (4.4fps), 0+0+0+0=0 0
[17:40:34.348] MJPG: 48822B 75ms (13.3fps), AVG: 223ms (4.5fps), 0+0+0+0=0 0
[17:40:34.660] MJPG: 48825B 311ms (3.2fps), AVG: 232ms (4.3fps), 0+0+0+0=0 0
[17:40:34.817] MJPG: 49600B 158ms (6.3fps), AVG: 232ms (4.3fps), 0+0+0+0=0 0
[17:40:34.978] MJPG: 48805B 160ms (6.2fps), AVG: 231ms (4.3fps), 0+0+0+0=0 0
image.png

可以調(diào)節(jié)各種參數(shù),亮度、白平衡。
esp32-cam竟然還能人臉識別,超厲害;

image.png

6、擴展

可以抓圖或者人臉識別傳送后臺服務(wù)器;
比如采用sim800l類似的透傳芯片;
https://github.com/carrascoacd/ArduinoSIM800L
通過at指令發(fā)送數(shù)據(jù)亦可;
https://github.com/erdemarslan/GSMSim
也可以跑mqtt;
https://github.com/martinhol221/SIM800L_MQTT
nb-iot arduino開發(fā),sim7020芯片
https://github.com/pornpol/NB_Meter_SIM7020E
https://create.arduino.cc/projecthub/voske65/arduino-nb-iot-with-sim7020-and-t-mobile-027f8f
圖片上報參考
https://github.com/raphaelbs/esp32-cam-ai-thinker
https://github.com/yoursunny/ESP32-CAM-OV2640/blob/master/examples/WiFiCam/WifiCam.ino

7、批量燒錄方式補充

arduino燒錄后找到臨時目錄,如下類似;

C:\Users\3doyen\AppData\Local\Temp\arduino_build_810217

image.png

復(fù)制紅框文件出來;

下載bootloader

https://github.com/espressif/arduino-esp32/tree/master/tools/sdk/bin

image.png

用esp download tools燒錄
image.png

更適合批量方式;

全文完;

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容