本文主要是使用XIAO Esp32 S3制作網絡攝像頭的第2步,獲取攝像頭圖像。
1、效果如下:
2、所需硬件
3、代碼實現
3.1硬件代碼:
#include "WiFi.h"
#include "WiFiClient.h"
#include "esp_camera.h"
#include "camera_pins.h"// 設置WiFi網絡的名稱和密碼
const char* ssid = "yuxuan";
const char* password = "yuxuan893";// 服務器的 IP 地址和端口
const char* server_ip = "192.168.0.6"; // Python 服務器的 IP 地址
const int server_port = 5555; // 與