原作者鏈接,fork自大道至簡非簡
1挠唆、安裝arduino
https://www.arduino.cc/en/Main/Software?setlang=cn
根據需要下載所需版本并安裝处窥;
運行下;
只有默認的arduino配套的開發(fā)板玄组;
2滔驾、配置esp32
打開首選項
配置esp庫url
https://dl.espressif.com/dl/package_esp32_index.json
配置開發(fā)板
根據esp32搜索選中安裝;
文件比較大下載比較慢俄讹,如果有需要請翻墻處理哆致;
安裝完成就可以選擇esp32開發(fā)板了。
3患膛、配置編譯tools
C:\Program Files (x86)\Arduino\hardware
建立目錄espressif/esp32
https://github.com/espressif/arduino-esp32
下載文件然后復制到目錄摊阀;
然后找到執(zhí)行下,機器需要python環(huán)境;
下載需要時間胞此;
4臣咖、體驗測試;
選擇開發(fā)板類型
選擇sample程序
修改攝像頭類型漱牵;改成安信可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";
編譯
選擇項目菜單夺蛇,編譯/驗證試試看;
運行成功酣胀;
燒錄固件刁赦;
選擇esp32-cam對應的串口;
選擇菜單上傳闻镶;
需要把燒錄的接口接gnd甚脉,然后觸發(fā)reset下;然后就看到編譯后開始燒錄了儒溉;
出現(xiàn)下面提示燒錄完成宦焦;
5、測試效果顿涣;
arduino的串口調試不夠方便,推薦友善調試助手酝豪;
把燒錄的 杜邦線拿掉涛碑;
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
根據提示的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
可以調節(jié)各種參數(shù)揉阎,亮度、白平衡背捌。
esp32-cam竟然還能人臉識別毙籽,超厲害;
6毡庆、擴展
可以抓圖或者人臉識別傳送后臺服務器坑赡;
比如采用sim800l類似的透傳芯片;
https://github.com/carrascoacd/ArduinoSIM800L
通過at指令發(fā)送數(shù)據亦可么抗;
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
復制紅框文件出來;
下載bootloader
https://github.com/espressif/arduino-esp32/tree/master/tools/sdk/bin
用esp download tools燒錄
更適合批量方式捆探;
全文完甸昏;