Unverified Commit ba68f318 authored by Jan Procházka's avatar Jan Procházka Committed by GitHub

Updated camera example (#7533)

parent dbeae948
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
// Select camera model // Select camera model
// =================== // ===================
//#define CAMERA_MODEL_WROVER_KIT // Has PSRAM //#define CAMERA_MODEL_WROVER_KIT // Has PSRAM
//#define CAMERA_MODEL_ESP_EYE // Has PSRAM #define CAMERA_MODEL_ESP_EYE // Has PSRAM
//#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM //#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM //#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM
//#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM //#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM //#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM
//#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM //#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
#define CAMERA_MODEL_AI_THINKER // Has PSRAM //#define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM //#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
// ** Espressif Internal Boards ** // ** Espressif Internal Boards **
//#define CAMERA_MODEL_ESP32_CAM_BOARD //#define CAMERA_MODEL_ESP32_CAM_BOARD
...@@ -37,6 +37,7 @@ const char* ssid = "**********"; ...@@ -37,6 +37,7 @@ const char* ssid = "**********";
const char* password = "**********"; const char* password = "**********";
void startCameraServer(); void startCameraServer();
void setupLedFlash(int pin);
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
...@@ -124,6 +125,11 @@ void setup() { ...@@ -124,6 +125,11 @@ void setup() {
s->set_vflip(s, 1); s->set_vflip(s, 1);
#endif #endif
// Setup LED FLash if LED pin is defined in camera_pins.h
#if defined(LED_GPIO_NUM)
setupLedFlash(LED_GPIO_NUM);
#endif
WiFi.begin(ssid, password); WiFi.begin(ssid, password);
WiFi.setSleep(false); WiFi.setSleep(false);
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#define HREF_GPIO_NUM 27 #define HREF_GPIO_NUM 27
#define PCLK_GPIO_NUM 25 #define PCLK_GPIO_NUM 25
#define LED_GPIO_NUM 22
#elif defined(CAMERA_MODEL_M5STACK_PSRAM) #elif defined(CAMERA_MODEL_M5STACK_PSRAM)
#define PWDN_GPIO_NUM -1 #define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15 #define RESET_GPIO_NUM 15
...@@ -94,6 +96,8 @@ ...@@ -94,6 +96,8 @@
#define HREF_GPIO_NUM 26 #define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21 #define PCLK_GPIO_NUM 21
#define LED_GPIO_NUM 2
#elif defined(CAMERA_MODEL_M5STACK_ESP32CAM) #elif defined(CAMERA_MODEL_M5STACK_ESP32CAM)
#define PWDN_GPIO_NUM -1 #define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15 #define RESET_GPIO_NUM 15
...@@ -151,6 +155,8 @@ ...@@ -151,6 +155,8 @@
#define HREF_GPIO_NUM 23 #define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22 #define PCLK_GPIO_NUM 22
#define LED_GPIO_NUM 33
#elif defined(CAMERA_MODEL_TTGO_T_JOURNAL) #elif defined(CAMERA_MODEL_TTGO_T_JOURNAL)
#define PWDN_GPIO_NUM 0 #define PWDN_GPIO_NUM 0
#define RESET_GPIO_NUM 15 #define RESET_GPIO_NUM 15
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment