Add TTGO T Journal Camera module & improve commenting (#3515)

Added pinout for TTGO T Journal device and improved the intent of comments.
This commit is contained in:
WizardTim 2020-01-20 23:33:38 +10:00 committed by Me No Dev
parent 7b3c1dfd50
commit 5443d7ca93
2 changed files with 36 additions and 13 deletions

View File

@ -2,16 +2,18 @@
#include <WiFi.h> #include <WiFi.h>
// //
// WARNING!!! Make sure that you have either selected ESP32 Wrover Module, // WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality
// or another board which has PSRAM enabled // Ensure ESP32 Wrover Module or other board with PSRAM is selected
// Partial images will be transmitted if image exceeds buffer size
// //
// Select camera model // Select camera model
#define CAMERA_MODEL_WROVER_KIT #define CAMERA_MODEL_WROVER_KIT // Has PSRAM
//#define CAMERA_MODEL_ESP_EYE //#define CAMERA_MODEL_ESP_EYE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM //#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
//#define CAMERA_MODEL_AI_THINKER //#define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
#include "camera_pins.h" #include "camera_pins.h"
@ -46,7 +48,9 @@ void setup() {
config.pin_reset = RESET_GPIO_NUM; config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000; config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG; config.pixel_format = PIXFORMAT_JPEG;
//init with high specs to pre-allocate larger buffers
// if PSRAM IC present, init with UXGA resolution and higher JPEG quality
// for larger pre-allocated frame buffer.
if(psramFound()){ if(psramFound()){
config.frame_size = FRAMESIZE_UXGA; config.frame_size = FRAMESIZE_UXGA;
config.jpeg_quality = 10; config.jpeg_quality = 10;
@ -73,7 +77,7 @@ void setup() {
// initial sensors are flipped vertically and colors are a bit saturated // initial sensors are flipped vertically and colors are a bit saturated
if (s->id.PID == OV3660_PID) { if (s->id.PID == OV3660_PID) {
s->set_vflip(s, 1); // flip it back s->set_vflip(s, 1); // flip it back
s->set_brightness(s, 1);//up the blightness just a bit s->set_brightness(s, 1); // up the brightness just a bit
s->set_saturation(s, -2); // lower the saturation s->set_saturation(s, -2); // lower the saturation
} }
// drop down frame size for higher initial frame rate // drop down frame size for higher initial frame rate

View File

@ -94,6 +94,25 @@
#define HREF_GPIO_NUM 23 #define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22 #define PCLK_GPIO_NUM 22
#elif defined(CAMERA_MODEL_TTGO_T_JOURNAL)
#define PWDN_GPIO_NUM 0
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 25
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 17
#define VSYNC_GPIO_NUM 22
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
#else #else
#error "Camera model not selected" #error "Camera model not selected"
#endif #endif