22#include < WiFi.h>
33
44//
5- // WARNING!!! Make sure that you have either selected ESP32 Wrover Module,
6- // or another board which has PSRAM enabled
5+ // WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality
6+ // Ensure ESP32 Wrover Module or other board with PSRAM is selected
7+ // Partial images will be transmitted if image exceeds buffer size
78//
89
910// Select camera model
10- #define CAMERA_MODEL_WROVER_KIT
11- // #define CAMERA_MODEL_ESP_EYE
12- // #define CAMERA_MODEL_M5STACK_PSRAM
13- // #define CAMERA_MODEL_M5STACK_WIDE
14- // #define CAMERA_MODEL_AI_THINKER
11+ #define CAMERA_MODEL_WROVER_KIT // Has PSRAM
12+ // #define CAMERA_MODEL_ESP_EYE // Has PSRAM
13+ // #define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM
14+ // #define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
15+ // #define CAMERA_MODEL_AI_THINKER // Has PSRAM
16+ // #define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
1517
1618#include " camera_pins.h"
1719
@@ -46,7 +48,9 @@ void setup() {
4648 config.pin_reset = RESET_GPIO_NUM;
4749 config.xclk_freq_hz = 20000000 ;
4850 config.pixel_format = PIXFORMAT_JPEG;
49- // init with high specs to pre-allocate larger buffers
51+
52+ // if PSRAM IC present, init with UXGA resolution and higher JPEG quality
53+ // for larger pre-allocated frame buffer.
5054 if (psramFound ()){
5155 config.frame_size = FRAMESIZE_UXGA;
5256 config.jpeg_quality = 10 ;
@@ -70,13 +74,13 @@ void setup() {
7074 }
7175
7276 sensor_t * s = esp_camera_sensor_get ();
73- // initial sensors are flipped vertically and colors are a bit saturated
77+ // initial sensors are flipped vertically and colors are a bit saturated
7478 if (s->id .PID == OV3660_PID) {
75- s->set_vflip (s, 1 );// flip it back
76- s->set_brightness (s, 1 );// up the blightness just a bit
77- s->set_saturation (s, -2 );// lower the saturation
79+ s->set_vflip (s, 1 ); // flip it back
80+ s->set_brightness (s, 1 ); // up the brightness just a bit
81+ s->set_saturation (s, -2 ); // lower the saturation
7882 }
79- // drop down frame size for higher initial frame rate
83+ // drop down frame size for higher initial frame rate
8084 s->set_framesize (s, FRAMESIZE_QVGA);
8185
8286#if defined(CAMERA_MODEL_M5STACK_WIDE)
0 commit comments