EasyManuals Logo

Freenove ESP32-S3 User Manual

Default Icon
142 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #123 background imageLoading...
Page #123 background image
Any concerns? support@freenove.com
121
Chapter 7 Camera Web Server
www.freenove.com
Initialize the serial port, buttons, lights and SD card.
10
11
12
13
14
15
Serial.begin(115200);
Serial.setDebugOutput(false);
Serial.println();
pinMode(BUTTON_PIN, INPUT_PULLUP);
ws2812Init();
sdmmcInit();
Call ws2812SetColor() to set the color of the LED. When the parameter is 0, the LED is turned off, when the
parameter is 1, the red light is displayed, when the parameter is 2, the green light is displayed, and when the
parameter is 3, the blue light is displayed.
20
ws2812SetColor(2);
Get the camera data once, then read the file number in the camera folder of the SD card, and create a new
file based on this, write the camera data into it, and finally return the camera structure pointer. If the camera
data cannot be obtained, the prompt information will be printed directly.
34
35
36
37
38
39
40
41
42
43
44
45
46
47
camera_fb_t * fb = NULL;
fb = esp_camera_fb_get();
if (fb != NULL) {
int photo_index = readFileNum(SD_MMC, "/camera");
if(photo_index!=-1)
{
String path = "/camera/" + String(photo_index) +".jpg";
writejpg(SD_MMC, path.c_str(), fb->buf, fb->len);
}
esp_camera_fb_return(fb);
}
else {
Serial.println("Camera capture failed.");
}

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Freenove ESP32-S3 and is the answer not in the manual?

Freenove ESP32-S3 Specifications

General IconGeneral
BrandFreenove
ModelESP32-S3
CategoryControl Unit
LanguageEnglish