2
2
#include < WiFi.h>
3
3
4
4
//
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
7
8
//
8
9
9
10
// 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
15
17
16
18
#include " camera_pins.h"
17
19
@@ -46,7 +48,9 @@ void setup() {
46
48
config.pin_reset = RESET_GPIO_NUM;
47
49
config.xclk_freq_hz = 20000000 ;
48
50
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.
50
54
if (psramFound ()){
51
55
config.frame_size = FRAMESIZE_UXGA;
52
56
config.jpeg_quality = 10 ;
@@ -70,13 +74,13 @@ void setup() {
70
74
}
71
75
72
76
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
74
78
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
78
82
}
79
- // drop down frame size for higher initial frame rate
83
+ // drop down frame size for higher initial frame rate
80
84
s->set_framesize (s, FRAMESIZE_QVGA);
81
85
82
86
#if defined(CAMERA_MODEL_M5STACK_WIDE)
0 commit comments