Skip to content

Commit 5443d7c

Browse files
WizardTimme-no-dev
authored andcommitted
Add TTGO T Journal Camera module & improve commenting (#3515)
Added pinout for TTGO T Journal device and improved the intent of comments.
1 parent 7b3c1df commit 5443d7c

File tree

2 files changed

+36
-13
lines changed

2 files changed

+36
-13
lines changed

Diff for: libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino

+17-13
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
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)

Diff for: libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h

+19
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,25 @@
9494
#define HREF_GPIO_NUM 23
9595
#define PCLK_GPIO_NUM 22
9696

97+
#elif defined(CAMERA_MODEL_TTGO_T_JOURNAL)
98+
#define PWDN_GPIO_NUM 0
99+
#define RESET_GPIO_NUM 15
100+
#define XCLK_GPIO_NUM 27
101+
#define SIOD_GPIO_NUM 25
102+
#define SIOC_GPIO_NUM 23
103+
104+
#define Y9_GPIO_NUM 19
105+
#define Y8_GPIO_NUM 36
106+
#define Y7_GPIO_NUM 18
107+
#define Y6_GPIO_NUM 39
108+
#define Y5_GPIO_NUM 5
109+
#define Y4_GPIO_NUM 34
110+
#define Y3_GPIO_NUM 35
111+
#define Y2_GPIO_NUM 17
112+
#define VSYNC_GPIO_NUM 22
113+
#define HREF_GPIO_NUM 26
114+
#define PCLK_GPIO_NUM 21
115+
97116
#else
98117
#error "Camera model not selected"
99118
#endif

0 commit comments

Comments
 (0)