While trying to understand the cam web server code in one of the examples on Arduino IDE but I’m struggling to understand the code. What is it checking for and what is it configuring and lastly why is it needed ...Read more
While trying to understand the cam web server code in one of the examples on Arduino IDE but I’m struggling to understand the code. What is it checking for and what is it configuring and lastly why is it needed in our code ? I have an AI thinker so do I still need this part of code ? Any help, links, etc. would be appreciated.
#if defined(CAMERA_MODEL_ESP_EYE) pinMode(13, INPUT_PULLUP); pinMode(14, INPUT_PULLUP); #endif // camera init esp_err_t err = esp_camera_init(&config); if (err != ESP_OK) { Serial.printf(“Camera init failed with error 0x%x”, err); return; } sensor_t * s = esp_camera_sensor_get(); // initial sensors are flipped vertically and colors are a bit saturated if (s->id.PID == OV3660_PID) { s->set_vflip(s, 1); // flip it back s->set_brightness(s, 1); // up the brightness just a bit s->set_saturation(s, -2); // lower the saturation } // drop down frame size for higher initial frame rate if(config.pixel_format == PIXFORMAT_JPEG){ s->set_framesize(s, FRAMESIZE_QVGA); } #if defined(CAMERA_MODEL_M5STACK_WIDE) || defined(CAMERA_MODEL_M5STACK_ESP32CAM) s->set_vflip(s, 1); s->set_hmirror(s, 1); #endif #if defined(CAMERA_MODEL_ESP32S3_EYE) s->set_vflip(s, 1); #endif
Read less
If you are using ESP32CAM AI Thinker, the embedded camera is an OV2640 so only part of the code will be compiled/executed, see below. The bottom line is you could leave code as-is, it should be ok Note that frame size can take following values : frame size QQVGA(160x120),HQVGA(240x176),QVGA(320x240)Read more
If you are using ESP32CAM AI Thinker, the embedded camera is an OV2640 so only part of the code will be compiled/executed, see below.
See lessThe bottom line is you could leave code as-is, it should be ok
Note that frame size can take following values :
frame size QQVGA(160×120),HQVGA(240×176),QVGA(320×240),CIF(400×296),VGA(640×480),SVGA(800×600),XGA(1024×768),SXGA(1280×1024),UXGA(1600×1200)