Cov txheej txheem:

Pib Nrog ESP32 CAM - Streaming Video Siv ESP CAM Tshaj Wifi - ESP32 Txoj Haujlwm Koob Yees Duab Ruaj Ntseg: 8 Kauj Ruam
Pib Nrog ESP32 CAM - Streaming Video Siv ESP CAM Tshaj Wifi - ESP32 Txoj Haujlwm Koob Yees Duab Ruaj Ntseg: 8 Kauj Ruam

Video: Pib Nrog ESP32 CAM - Streaming Video Siv ESP CAM Tshaj Wifi - ESP32 Txoj Haujlwm Koob Yees Duab Ruaj Ntseg: 8 Kauj Ruam

Video: Pib Nrog ESP32 CAM - Streaming Video Siv ESP CAM Tshaj Wifi - ESP32 Txoj Haujlwm Koob Yees Duab Ruaj Ntseg: 8 Kauj Ruam
Video: Pib Tshiab Nrog Kuv- hu: CM XIONG Feat.NIKKI THAO [ Official Audio] 2023 2024, Lub Xya hli ntuj
Anonim
Pib Nrog ESP32 CAM | Streaming Video Siv ESP CAM Tshaj Wifi | ESP32 Kev Ruaj Ntseg Lub Koob Yees Duab Project
Pib Nrog ESP32 CAM | Streaming Video Siv ESP CAM Tshaj Wifi | ESP32 Kev Ruaj Ntseg Lub Koob Yees Duab Project

Hnub no peb yuav kawm paub yuav siv ESP32 CAM pawg tshiab no li cas thiab peb yuav sau nws li cas thiab siv nws li lub koob yees duab kev nyab xeeb thiab tau txais cov vis dis aus hla wifi.

Kauj Ruam 1: Yam Koj Xav Tau

Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau

Ua ntej peb pib ua kom ntseeg tau tias koj muaj cov hauv qab no nrog koj: ESP 32 CAM:

FTDI:

Kauj Ruam 2: ESP32 Arduino IDE Teeb

ESP32 Arduino IDE Teeb
ESP32 Arduino IDE Teeb

Nco ntsoov tias koj muaj Arduino IDE hauv koj lub PC thiab koj tau teeb tsa ESP32 Boards hauv koj Arduino IDE, thiab yog tias nws tsis yog qhov xwm txheej thov ua raws cov lus qhia hauv qab no ntawm kuv kom nruab nws.:

Kauj Ruam 3: ESP32 CAM Pawg Tshwj Xeeb

ESP32 CAM Board Cov Lus Qhia Tshwj Xeeb
ESP32 CAM Board Cov Lus Qhia Tshwj Xeeb

Ua ntej peb mus ua ib yam dab tsi kom ntseeg tau tias koj paub qhov tshwj xeeb thiab pinout thiab lwm yam ntawm ESP32 CAM pawg thawj coj, thiab rau cov duab pinout tau ntxiv thov xa mus thiab qhov tshwj xeeb ntawm ESP32 CAM board tau muab hauv qab no: Qhov tsawg tshaj plaws 802.11b/g/n Wi-nkaus BT SoC moduleLub hwj chim 32-ntsis CPU, tseem tuaj yeem ua haujlwm rau daim ntawv thov nce txog 160MHz moos nrawm, suav suav suav txog 600 DMIPSBuilt-in 520 KB SRAM, sab nraud 4MPSRAMSupports UART/SPI/I2C/PWM/ADC/DACSupport OV2640 thiab OV7670 lub koob yees duab, built-in flash lampSupport duab WiFI uploadSupport TF cardSupports multiple sleep modesEmbedded Lwip and FreeRTOSSupports STA/AP/STA+AP operation modeSupport Smart Config/AirKiss technologySupport for serial port local and remote firmware upgrade (FOTA) Pins used for microSD card nyeem ntawv:: CLKGPIO 15: CMDGPIO 2: Cov Ntaub Ntawv 0GPIO 4: Cov Ntaub Ntawv 1 (tseem txuas nrog rau ntawm lub nkoj LED) GPIO 12: Cov Ntaub Ntawv 2GPIO 13: Cov Ntaub Ntawv 3

Kauj Ruam 4: Txuas Txhua Yam Ua Ke

Txuas Txhua Yam Ua Ke
Txuas Txhua Yam Ua Ke

Txhawm rau ua qhov haujlwm no peb yuav tsum txuas FTDI/usb rau ttl rau qhov haujlwm no vim tias pawg thawj coj no tsis muaj ib qho, yog li txuas Ftdi/usb rau ttl raws li schmatics.

Kauj ruam 5: Tau txais Txoj Cai

Hauv koj li Arduino IDE, mus rau Cov Ntaub Ntawv> Piv Txwv> ESP32> Lub Koob Yees Duab thiab qhib lub CameraWebServer piv txwv.or koj tuaj yeem siv cov lej muab hauv qab no, luam cov cai hauv qab no: #include "esp_camera.h" #include #include "esp_timer.h" #include "img_converters.h" #include "Arduino.h" #include "fb_gfx.h" #include "soc/soc.h" // lov tes taw teeb meem brownout#suav nrog "soc/rtc_cntl_reg.h" // lov tes taw teeb meem brownout# suav nrog "dl_lib.h" #include "esp_http_server.h" // Hloov nrog koj lub network daim ntawv pov thawj kev nyab xeeb char* ssid = "REPLACE_WITH_YOUR_SSID"; const char* password = "REPLACE_WITH_YOUR_PASSWORD";#define PART_BOUNDARY "12345678900" qhov no tau sim nrog cov kabmob AI Thinker Model, M5STACK PSRAM Model thiab M5STACK TSIS PSRAM # txhais CAMERA_MODEL_AI_THINKER // # txhais CAMERA_MODEL_M5STACK_PSRAM // # txhais CAMERA_MODEL_M5STACK_WITHOUT_PSRAM // Tsis kuaj nrog cov qauv no // # txhais CAMERA_MODEL_WROVER_KIT yog tias txhais (CAMERA_MODEL_WROVER_KIT) #define PWDN_GPIO_NUM -1 #define RESET_GPIO_NUM -1 #define XCLK_G PIO_NUM 21 #define SIOD_GPIO_NUM 26 #define SIOC_GPIO_NUM 27 #define Y9_GPIO_NUM 35 #define Y8_GPIO_NUM 34 #define Y7_GPIO_NUM 39 #define Y6_GPIO_NUM 36 #define Y5_GPIO_NUM 19 #define Y4_GPIO_NUM 18 #define Y3_GPIO_NUM 5 #define Y2_GPIO_NUM 4 #define VSYNC_GPIO_NUM 25 #define HREF_GPIO_NUM 23 #define PCLK_GPIO_NUM 22 # elif txhais (CAMERA_MODEL_M5STACK_PSRAM) #define PWDN_GPIO_NUM -1 #define RESET_GPIO_NUM 15 #define XCLK_GPIO_NUM 27 #define SIOD_GPIO_NUM 25 #define SIOC_GPIO_NUM 23 #define Y9_GPIO_NUM 19 #define Y8_GPIO_NUM 36 #define Y7_GPIO_NUM 18 #define Y6_GPIO_NUM 39 #define Y5_GPIO_NUM 5 #define Y4_GPIO_NUM 34 #define Y3_GPIO_NUM 35 #define Y2_GPIO_NUM 32 #define VSYNC_GPIO_NUM 22 #define HREF_GPIO_NUM 26 #define PCLK_GPIO_NUM 21 # elif txhais (CAMERA_MODEL_M5STACK_WITHOUT_PSRAM) #define PWDN_GPIO_NUM -1 #define RESET_GPIO_NUM 15 #define XCLK_GPIO_NUM 27 #define SIOD_GPIO_NUM 25 #define SIOC_GPIO_NUM 23 #define Y9_GPIO_NUM 19 #define Y8_GPIO_NUM 36 #define Y7_GPIO_NUM 18 #define Y6_ GPIO_NUM 39 #define Y5_GPIO_NUM 5 #define Y4_GPIO_NUM 34 #define Y3_GPIO_NUM 35 #define Y2_GPIO_NUM 17 #define VSYNC_GPIO_NUM 22 #define HREF_GPIO_NUM 26 #define PCLK_GPIO_NUM 21 # elif txhais (CAMERA_MODEL_AI_THINKER) #define PWDN_GPIO_NUM 32 #define RESET_GPIO_NUM -1 #define XCLK_GPIO_NUM 0 # txhais SIOD_GPIO_NUM 26 #define SIOC_GPIO_NUM 27 #define Y9_GPIO_NUM 35 #define Y8_GPIO_NUM 34 #define Y7_GPIO_NUM 39 #define Y6_GPIO_NUM 36 #define Y5_GPIO_NUM 21 #define Y4_GPIO_NUM 19 #define Y3_GPIO_NUM 18 #define Y2_GPIO_NUM 5 #define VSYNC_GPIO_NUM 25 #define HREF_GPIO_NUM 23 #define PCLK_GPIO_NUM 22#lwm yam #error "Lub koob yees duab qauv tsis tau xaiv" #endifstatic const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace; border =" PART_BOUNDARY; static const char* _STREAM_BOUNDARY = "\ r / n-" PART_BOUNDARY "\ r / n "; zoo li qub char * _STREAM_PART =" Cov ntsiab lus-hom: duab/jpeg / r / nContent-Ntev: %u / r / n / r / n "; httpd_handle_t stream_httpd = NULL; zoo li qub esp_err_t stream_handler (httpd_req_t * req) {camera_fb_t * f b = NULL; esp_err_t res = ESP_OK; size_t _jpg_buf_len = 0; uint8_t * _jpg_buf = NULL; char * part_buf [64]; res = httpd_resp_set_type (req, _STREAM_CONTENT_TYPE); yog (res! = ESP_OK) {rov res; } thaum (tseeb) {fb = esp_camera_fb_get (); yog (! fb) {Serial.println ("Lub koob yees duab ntes tsis tau"); res = ESP_FAIL; } lwm {if (fb-> dav> 400) {yog (fb-> hom ntawv! = PIXFORMAT_JPEG) {bool jpeg_converted = frame-j.webp

Kauj Ruam 6: Tshaj Tawm Txoj Cai

Rub tawm Txoj Cai
Rub tawm Txoj Cai

Tom qab tau txais cov cai, koj yuav tsum tau xa cov cai thiab nws yuav tsum muaj qee qhov teeb tsa txhawm rau upload cov cai yog li ua kom ntseeg tau tias koj tau ua raws li qhov no thaum rub tawm vim tias nws yog txoj cai khawm yog li nws yuav tsis tau txais kev tso tawm los ntawm ib txwm siv. xaiv ESP32 Wrover Module Mus rau Cov Cuab Yeej> Chaw Nres Nkoj thiab xaiv COM chaw nres nkoj ESP32 txuas nrog Hauv Cov Cuab Yeej> Cov phiaj xwm faib tawm, xaiv "APP loj (3MB Tsis Muaj OTA)" Ua ntej rub tawm cov cai, koj yuav tsum tau nkag mus rau koj li ntaub ntawv pov thawj wifi hauv ntu hauv qab no code: const char* ssid = "REPLACE_WITH_YOUR_SSID"; const char* password = "REPLACE_WITH_YOUR_PASSWORD"; thiab xyuas kom tseeb tias koj xaiv lub koob yees duab zoo. Raws li ntawm no peb tau siv AI-THINKER Qauv yog li xaiv cov hauv qab no, tawm tswv yim tag nrho lwm tus qauv thiab tsis pom zoo qhov no: #define CAMERA_MODEL_AI_THINKER Nias ESP32-CAM on-board RESET khawm Tom qab ntawd, nyem lub pob upload kom tso tus lej.

Kauj Ruam 7: Tau txais IP

Ua tus IP
Ua tus IP

Tshem lub jumper txuas nrog ntawm GPIO0 & GND tom qab ntawd, Qhib Serial Monitor nrog tus nqi baud: 115200 & tom qab ntawd Nias ESP32-CAM Pib dua lub pob thiab tos kom IP tshwm thiab tos ob peb feeb thiab tom qab ntawd ntaus dua. pom kuv tau txais kuv tus IP thiab nws tau hais meej hauv daim duab.

Kauj Ruam 8: Tau Txais Wifi Streaming Video

Tau txais Wifi Streaming Video
Tau txais Wifi Streaming Video

Qhib koj tus browser thiab paub tseeb tias koj lub PC txuas nrog tib lub network zoo li ESP32 CAM thiab tom qab ntawd ntaus IP hauv koj tus browser ces nyem rau ntawm lub pob dej thiab koj yuav tau txais koj cov vis dis aus thiab muaj qee qhov teeb tsa ntawm no ib yam yog li koj tuaj yeem sim ua thiab tau txais cov vis dis aus zoo ib yam.

Pom zoo: